Correct solutions were submitted by Dan Dima, Al Zimmermann, Jens Voβ, Ahron Teitelman, Juan Carlos Marivela, Lou Cairoli.
The polynomial yields an integer if and only if r is an integer or of the form (9k - 1)/3.
Write r = p/q, with p and q relatively prime. Substituting, we get the integer 3(p3/q3) + 10(p2/q2) - 3(p/q). Putting everything over a common denominator, we conclude that q3 divides N = 3p3 + 10p2q - 3pq2 and then q divides N, too. Since q divides the last two summands of N it must divide the first, too. As p and q are relatively prime, q must divide 3; it follows that either q = 1, and r is itself an integer; or q = 3. In the latter case
27 divides 3p3 + 30p2 - 27p if and only if
9 divides p3 + 10p2 - 9p if and only if
9 divides p3 + 10p2 if and only if
9 divides p2(p + 10).
Since p is not divisible by 3, 9 can't divide p2, and so must divide p + 10, and p + 1. Write p = 9k - 1, for some integer k, then r = (9k - 1)/3. It's now easy to show what any fraction of this form yields an integer when substituted into the original equation.
©2005 Alberto L. Delgado