During AMC testing, the AoPS Wiki is in read-only mode. No edits can be made.

# 2013 AIME II Problems/Problem 12

## Problem 12

Let $S$ be the set of all polynomials of the form $z^3 + az^2 + bz + c$, where $a$, $b$, and $c$ are integers. Find the number of polynomials in $S$ such that each of its roots $z$ satisfies either $|z| = 20$ or $|z| = 13$.

## Solution

Every cubic in real coefficients has to have either three real roots or one real and two complex roots which are conjugates. This follows from Vieta's formulas. Factorise the polynomial $(z-r)(z-\omega)(z-\omega^*)$, where $\omega^*$ is the complex conjugate of omega. We know that $r$ is the real root which must be $-20$, $20$, $-13$, or $13$, and it doesn't matter which. $|\omega|=|\omega^*|=20 \ \text{or}\ 13$. Let $\omega=\alpha+i\beta$. Viète tells us that $a=-(r+\omega+\omega^*$), but $\omega+\omega^*=2\Re{(\omega)}$ (i.e., adding the conjugates cancels the imaginary part). a the quadratic coefficient must be an integer so $\Re{(\omega)}$ is some integer over $2$. $|\omega|=|\omega^*|=$20 or 13 so you have a bound on $\Re{(\omega)}$: either $-13\leq\Re{(\omega)}\leq 13$ or $-20\leq\Re{(\omega)}\leq 20$. Don't forget zero! We're not double counting the numbers between $-13$ and $13$ here because there's an imaginary part too -- $\sqrt{\alpha^2+\beta^2}=|\omega|$, and what you get when you solve for beta will depend on what the magnitude was. You have the magnitude so $\Re{(\omega)}$ determines $\omega$ totally (you can solve for the imaginary part) and $\omega$ determines $\omega^*$. Now just count: 4 possibilities for the real root times [(52+1) possibilities if $|\omega|=13$ plus (80+1) possibilities if $|\omega|=20$ = 536. But this is not all, we also have ${4\choose{3}}=4$ ways of constructing a totally real polynomial (all real roots), which gives you $\boxed{540}$.