AMC 10 Step by Step

2025 AMC 10B Problem 10

P1-10~4 minPrint

Let f(n)=n3−5n2+2n+8f(n)=n^3-5n^2+2n+8 and g(n)=n3−6n2+5n+12.g(n)=n^3-6n^2+5n+12. What is the sum of all integers nn such that f(n)g(n)\tfrac{f(n)}{g(n)} is an integer?

Log in to save your progress.
Show solution without answering

Key insight

Subtracting gives f − g = (n−4)(n+1), a factor of both. The fraction becomes (n−2)/(n−3), but n = 4 is out because g(4) = 0.

Solution

1. Subtract to find something in common. The two cubics have the same n3n^3 term, so subtract them and it disappears:
f(n)−g(n)=(n3−5n2+2n+8)−(n3−6n2+5n+12)=n2−3n−4=(n−4)(n+1).f(n) - g(n) = (n^3 - 5n^2 + 2n + 8) - (n^3 - 6n^2 + 5n + 12) = n^2 - 3n - 4 = (n-4)(n+1).

2. Test those numbers in gg. Try n=4n = 4: g(4)=64−96+20+12=0g(4) = 64 - 96 + 20 + 12 = 0. Try n=−1n = -1: g(−1)=−1−6−5+12=0g(-1) = -1 - 6 - 5 + 12 = 0. So (n−4)(n-4) and (n+1)(n+1) are both factors of gg. The third factor must make the constant term 1212: (−4)(1)( ? )=12(-4)(1)(\,?\,) = 12, so it is (n−3)(n - 3):
g(n)=(n−4)(n+1)(n−3).g(n) = (n-4)(n+1)(n-3).

3. Factor ff the same way. f=g+(n−4)(n+1)f = g + (n-4)(n+1), so
f(n)=(n−4)(n+1)[(n−3)+1]=(n−4)(n+1)(n−2).f(n) = (n-4)(n+1)\bigl[(n-3) + 1\bigr] = (n-4)(n+1)(n-2).

4. Simplify the fraction. When nn is not 44, −1-1 or 33, cancel the common factors:
f(n)g(n)=n−2n−3=(n−3)+1n−3=1+1n−3.\frac{f(n)}{g(n)} = \frac{n-2}{n-3} = \frac{(n-3) + 1}{n-3} = 1 + \frac{1}{n-3}.
This is a whole number only when 1n−3\frac{1}{n-3} is, which means n−3=1n - 3 = 1 or n−3=−1n - 3 = -1. So n=4n = 4 or n=2n = 2.

  1. Check the numbers where we cancelled. At n=4n = 4, −1-1 and 33, the original denominator g(n)g(n) is 00, so the fraction does not exist at all. That rules out n=4n = 4, even though the simplified fraction looked fine there.
  1. Check n=2n = 2. f(2)=8−20+4+8=0f(2) = 8 - 20 + 4 + 8 = 0 and g(2)=8−24+10+12=6g(2) = 8 - 24 + 10 + 12 = 6, so the fraction is 00, a whole number.

Only n=2n = 2 works, so the sum is 22.

The answer is (A) 2\boxed{\textbf{(A)}\ 2}.

Why this works

When two polynomials start the same way, subtracting them gives something smaller that often shows their shared factors. After cancelling, pulling out the whole-number part (1+1n−31 + \frac{1}{n-3}) turns "is this a whole number?" into "what divides 11?". Whenever you cancel a factor, go back and check the values that made it zero; the original fraction may not exist there.

Alternative approach

Look for whole-number roots of each cubic. A whole-number root must divide the constant term. For ff, try divisors of 88: f(2)=0f(2) = 0, and dividing ff by (n−2)(n - 2) leaves n2−3n−4n^2 - 3n - 4. For gg, try divisors of 1212: g(3)=27−54+15+12=0g(3) = 27 - 54 + 15 + 12 = 0, and dividing gg by (n−3)(n-3) leaves the same n2−3n−4n^2 - 3n - 4. Cancel it to get n−2n−3\frac{n-2}{n-3}, then finish as above.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

Subtract first; the cubic terms cancel:
f(n)−g(n)=n2−3n−4=(n−4)(n+1).f(n) - g(n) = n^2 - 3n - 4 = (n-4)(n+1).
That suggests testing n=4n = 4 and n=−1n = -1 in gg: g(4)=64−96+20+12=0g(4) = 64 - 96 + 20 + 12 = 0 and g(−1)=−1−6−5+12=0g(-1) = -1 - 6 - 5 + 12 = 0. So (n−4)(n+1)(n-4)(n+1) divides gg, and since gg is monic of degree 33,
g(n)=(n−4)(n+1)(n−3).g(n) = (n-4)(n+1)(n-3).
Then f(n)=g(n)+(n−4)(n+1)=(n−4)(n+1)(n−2)f(n) = g(n) + (n-4)(n+1) = (n-4)(n+1)(n-2).

For every nn outside {−1,3,4}\{-1, 3, 4\} the common factor cancels:
f(n)g(n)=n−2n−3=1+1n−3.\frac{f(n)}{g(n)} = \frac{n-2}{n-3} = 1 + \frac{1}{n-3}.
This is an integer exactly when n−3n - 3 divides 11, that is n=4n = 4 or n=2n = 2.

Now check the excluded values. At n=−1,3,4n = -1, 3, 4 the denominator g(n)g(n) is zero, so the quotient does not exist; in particular n=4n = 4 must be discarded even though it survived the cancelled form. Only n=2n = 2 remains, and f(2)g(2)=0−6=0\frac{f(2)}{g(2)} = \frac{0}{-6} = 0 is indeed an integer.

The sum of all such nn is 22.

The answer is (A) 2\boxed{\textbf{(A)}\ 2}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.