AMC 10 · 2025 · #10
Grade 8 algebraLet f(n)=n3−5n2+2n+8 and g(n)=n3−6n2+5n+12. What is the sum of all integers n such that g(n)f(n) is an integer?
Pick an answer.
AMC 10 2025 problem © Mathematical Association of America (MAA AMC). Reproduced for educational use.
Try it yourself first — the explanation is most useful after you’ve attempted it.
Toolkit + CCSS Solution
Understand
Restated: Two cubic expressions are given: $f(n)=n^3-5n^2+2n+8$ and $g(n)=n^3-6n^2+5n+12$. Find every integer $n$ for which the fraction $\tfrac{f(n)}{g(n)}$ comes out to a whole number, then add all those integers together.
Givens: $f(n)=n^3-5n^2+2n+8$; $g(n)=n^3-6n^2+5n+12$; $n$ ranges over the integers; We only keep an $n$ when $\tfrac{f(n)}{g(n)}$ is an integer (the division comes out exact); Answer choices: (A) 2, (B) 3, (C) 4, (D) 5, (E) 6
Unknowns: The sum of all integers $n$ that make $\tfrac{f(n)}{g(n)}$ an integer
Understand
Restated: Two cubic expressions are given: $f(n)=n^3-5n^2+2n+8$ and $g(n)=n^3-6n^2+5n+12$. Find every integer $n$ for which the fraction $\tfrac{f(n)}{g(n)}$ comes out to a whole number, then add all those integers together.
Givens: $f(n)=n^3-5n^2+2n+8$; $g(n)=n^3-6n^2+5n+12$; $n$ ranges over the integers; We only keep an $n$ when $\tfrac{f(n)}{g(n)}$ is an integer (the division comes out exact); Answer choices: (A) 2, (B) 3, (C) 4, (D) 5, (E) 6
Plan
Primary tool: #7 Identify Subproblems
Secondary: #6 Guess and Check, #15 Organize Information in More Ways, #3 Eliminate Possibilities
A ratio of two ugly cubics looks hopeless head-on, so Tool #7 (Identify Subproblems) splits it into three clean jobs: factor $f$, factor $g$, then compare. Tool #6 (Guess and Check) cracks each cubic by testing small integers to find a first root. Once both are factored, Tool #15 (Organize Information in More Ways) rewrites the reduced fraction $\tfrac{n-2}{n-3}$ as $1+\tfrac{1}{n-3}$, which turns "when is this an integer?" into a simple divisibility question. Tool #3 (Eliminate Possibilities) then removes the value that secretly breaks the original fraction.
Execute — Answer: A
6.EE.A.2 Step 1 Factor the top cubic
- Hunt for an integer root of $f$ by plugging in small numbers.
- Testing $n=-1$ gives $-1-5-2+8=0$, so $n+1$ is a factor.
- Dividing out $n+1$ leaves $n^2-6n+8=(n-2)(n-4)$.
- So $f(n)=(n+1)(n-2)(n-4)$; a quick check of the roots $2$ and $4$ confirms $f(2)=f(4)=0$.
💡 A polynomial that equals zero at some number must have that number's factor hiding inside it.
7.EE.A.1 Step 2 Factor the bottom cubic
- Do the same for $g$.
- Again $n=-1$ works: $-1-6-5+12=0$, so $n+1$ is a factor.
- Dividing out $n+1$ leaves $n^2-7n+12=(n-3)(n-4)$.
- So $g(n)=(n+1)(n-3)(n-4)$, with roots $-1$, $3$, and $4$.
💡 Breaking each cubic into three simple factors makes the two expressions easy to line up side by side.
7.NS.A.2 Step 3 Cancel the shared factors
- Write the fraction with both factored forms and cancel the pieces they share, $n+1$ and $n-4$ (allowed only where those factors are not zero, i.e.
- $n\neq-1$ and $n\neq4$).
- What remains is a much simpler fraction.
- Keep in mind $g(n)=0$ at $n=-1,3,4$, so those are already forbidden.
💡 Matching factors on top and bottom divide to $1$, so the scary cubics collapse into one tidy ratio.
6.EE.A.3 Step 4 Split off the whole part
- Rewrite $n-2$ as $(n-3)+1$.
- Then the fraction separates into a whole number plus a small leftover: $\tfrac{n-2}{n-3}=1+\tfrac{1}{n-3}$.
- Now the whole $1$ is always an integer, so the fraction is an integer exactly when the leftover $\tfrac{1}{n-3}$ is an integer.
💡 Peeling off the built-in $1$ leaves just one tiny fraction to worry about.
4.OA.B.4 Step 5 When is the leftover a whole number?
- $\tfrac{1}{n-3}$ is a whole number only when the bottom $n-3$ divides $1$ exactly.
- The only integers that divide $1$ are $1$ and $-1$.
- So $n-3$ must equal $1$ or $-1$.
💡 A unit fraction $\tfrac{1}{k}$ is only whole when its denominator is as small as it can be: $\pm1$.
8.EE.C.7 Step 6 Solve for the candidate values
- Solve the two tiny equations.
- $n-3=1$ gives $n=4$, and $n-3=-1$ gives $n=2$.
- These are the only integers that could make the whole ratio an integer.
💡 Each allowed value of $n-3$ points straight to one value of $n$.
6.EE.A.2 Step 7 Throw out the fake solution and add up
- Check $n=4$ in the original fraction: both $f(4)=0$ and $g(4)=0$, giving $\tfrac{0}{0}$, which is undefined — so $n=4$ is not allowed.
- Only $n=2$ survives, and there $\tfrac{f(2)}{g(2)}=\tfrac{0}{6}=0$, a genuine integer.
- The sum of all valid integers is just $2$, so the answer is (A).
💡 Cancelling can hide a spot where the real fraction blows up, so always test the survivors in the original.
6.EE.A.2 Hunt for an integer root of $f$ by plugging in small numbers. Testing $n=-1$ giv 7.EE.A.1 Do the same for $g$. Again $n=-1$ works: $-1-6-5+12=0$, so $n+1$ is a factor. Di 7.NS.A.2 Write the fraction with both factored forms and cancel the pieces they share, $n 6.EE.A.3 Rewrite $n-2$ as $(n-3)+1$. Then the fraction separates into a whole number plus 4.OA.B.4 $\tfrac{1}{n-3}$ is a whole number only when the bottom $n-3$ divides $1$ exactl 8.EE.C.7 Solve the two tiny equations. $n-3=1$ gives $n=4$, and $n-3=-1$ gives $n=2$. The 6.EE.A.2 Check $n=4$ in the original fraction: both $f(4)=0$ and $g(4)=0$, giving $\tfrac Review
Reasonableness: Test the winner directly: $f(2)=8-20+4+8=0$ and $g(2)=8-24+10+12=6$, so $\tfrac{f(2)}{g(2)}=\tfrac{0}{6}=0$ is an integer, confirming $n=2$ genuinely works. The only other candidate, $n=4$, makes both cubics zero at once ($\tfrac{0}{0}$), so rejecting it is correct — that is exactly why the answer is $2$ and not $2+4=6$, ruling out the trap choice (E). Since the reduced form $1+\tfrac{1}{n-3}$ can only be an integer at the two spots where $n-3=\pm1$, no other integer can sneak in, confirming the sum is $2$.
Alternative: Skip the factoring and just test the small integers the answer choices hint at ($n=1,2,3,4,5$) in $\tfrac{f(n)}{g(n)}$. Only $n=2$ yields a whole number (and $n=4$ gives $\tfrac{0}{0}$), landing on the same sum $2$. This brute-force check is fast for a contest, but the factoring approach proves no larger integer works, which pure testing cannot guarantee.
CCSS standards used (min grade 8)
6.EE.A.2Write, read, and evaluate expressions in which letters stand for numbers (Plugging small integers into the cubics to find roots, and checking the surviving value $n=2$ (and the rejected $n=4$) back in the original fraction.)7.EE.A.1Apply properties of operations to add, subtract, factor, and expand linear expressions (Factoring each cubic into a product of linear pieces $(n+1)(n-2)(n-4)$ and $(n+1)(n-3)(n-4)$.)7.NS.A.2Apply and extend understanding of multiplication and division of rational numbers (Cancelling the shared factors $n+1$ and $n-4$ to reduce the ratio to $\tfrac{n-2}{n-3}$.)6.EE.A.3Apply the properties of operations to generate equivalent expressions (Rewriting $\tfrac{n-2}{n-3}$ as the equivalent $1+\tfrac{1}{n-3}$ to isolate the fractional part.)4.OA.B.4Find all factor pairs and recognize multiples; determine prime or composite (Recognizing that $\tfrac{1}{n-3}$ is a whole number only when $n-3$ divides $1$, i.e. equals $\pm1$.)8.EE.C.7Solve linear equations in one variable (Solving $n-3=1$ and $n-3=-1$ to get the candidate values $n=4$ and $n=2$.)
⭐ Factor both cubics, cancel what they share to get $1+\tfrac{1}{n-3}$, and the only whole-number results come from $n-3=\pm1$ — but toss out $n=4$ because it makes the real fraction $\tfrac{0}{0}$.
⭐ Factor both cubics, cancel what they share to get $1+\tfrac{1}{n-3}$, and the only whole-number results come from $n-3=\pm1$ — but toss out $n=4$ because it makes the real fraction $\tfrac{0}{0}$.
More like this
Same archetype — closest grade level first.