AIME Solution Set 2015: David Altizio January 12, 2018
AIME Solution Set 2015: David Altizio January 12, 2018
David Altizio
January 12, 2018
Abstract
These problems are ones I have collected from my problem-solving over the past few years that resemble
AIME level problems, except that none of them have actually appeared on the AIME. Each problem (should)
has a nonnegative integer answer, and each of the four sections have ten problems roughly ordered by difficulty.
I tried to make the sections of similar difficulties, but this is probably not the case (Combinatorics and Number
Theory seem easier than Algebra and Geometry). Have fun with the problems!
The majority of these problems have been selected from both collections of questions (AoPS, Brilliant, various
math camps) and actual contests (HMMT, iTest, Math League, Mandelbrot1 , NIMO, etc.).
1 Several of the Mandelbrot problems that appear in this collection came from the book Mandelbrot Morsels. To be honest, it has
some pretty awesome problems, and it’s one of the few books that has a bunch of problems that haven’t all been released onto the
Internet yet. It’s definitely worth checking out!
1
David Altizio AIME Solution Set 2015 Page 2
1 Algebra
1. Let c be the larger solution to the equation x2 − 20x + 13 = 0. Compute the area of the circle with center
(c, c) passing through the point (13, 7).
Solution. It suffices to find the distance between the two points (c, c) and (13, 7) - this value will be the
radius r of the circle and the desired answer is πr2 . We manipulate carefully and hope for the best:
p
r = (c − 13)2 + (c − 7)2
p
= (c2 − 26c + 169) + (c2 − 14c + 49)
p
= 2c2 − 40c + 218
p √
= 2(c2 − 20c + 13) + 192 = 192.
Success! As per our reasoning earlier the area of the circle is therefore 192π .
Solution. Let s = a + b + c. Expanding both sides of the equality and manipulating yields
1 1 1 1 1 1 1 1 1 1 1
abc + a + b + c + + + + =1+ + + + + + +
a b c abc a b c ab ac bc abc
1 1 1
=⇒ abc + a + b + c = 1 + + +
ab bc ca
a+b+c
=1+
abc
s
=⇒ 13 + s = 1 + .
13
Solution. This equation looks scary, but in fact it has a simple solution. Divide both sides by log2 x log4 x log6 x
to get
log2 x log4 x + log2 x log6 x + log4 x log6 x
1=
log2 x log4 x log6 x
1 1 1
= + +
log6 x log4 x log2 x
1 1 1
= + +
log x/ log 6 log x/ log 4 log x/ log 2
log 6 log 4 log 2 log 48
= + + = .
log x log x log x log x
√ √ √ √
4. Suppose that P is the polynomial of least degree with integral coefficients for which P ( 3 + 2) = 3 − 2.
Compute P (2).
√ √ √ √
Solution. Let t = 3 + 2. Note that 3 − 2 = 1t , so we wish to find a polynomial P (x) such that
P (t) = 1t . Squaring gives
√ √ √ √
t2 = ( 3 + 2)2 = 5 + 24 =⇒ t2 − 5 = 24.
Squaring again gives (t2 −5)2 = t4 −10t2 +25 = 24, so t4 −10t2 = −1 and 10t−t3 = 1t . Hence P (x) = 10x−x3
and the requested answer is P (2) = 20 − 8 = 012 .
Find a513 .
Let bn = (an − 1)2 . Then bn+1 = bn + 2 and b1 = 0, so an = 2(n − 1) for all positive integers n. (This is easily
provable by induction or anything else.) Hence b513 = 1024, so
This implies there exists a bijection between the number of possible values of S and the number of solutions
in positive integers to the Diophantine equation a + 2b = 75. To compute this new value, we simply realize
that a can take on every odd integer between 1 and 75, and that each of these values of a gives a unique b.
Therefore the number of possible values of S is 75+1
2 = 038 .
and let S(2008, t) be the sum of all products of these 2008 complex numbers taken t at a time. Let Q be the
maximum possible value of
S(2008, 1492)
S(2008, 516) .
P = z1 z2 . . . z2008 ,
we have
20111492 (p + p + · · · + p 2008 )
S(2008, 1492) 1 2 ( 1492)
S(2008, 516) =
!
2011516 P p1 + p1 + · · · + p 1
1 2
(1492)
2008
2011976 (p + p + · · · + p 2008 )
1 2 (1492)
=
P p1 + p2 + · · · + p(2008)
1492
(p + p + · · · + p 2008 )
1 1 2 (1492)
= 2011976 · ·
P p + p + · · · + p 2008
1 2 (1492)
= 2011976 · 1 · 1 = 2011976 .
Finally, to compute the last three digits of this integer, we note that
976 976
2011976 ≡ 11976 ≡ (10 + 1)976 ≡ 102 + 10 + 1 ≡ 761 (mod 1000).
2 1
{x2 } = {x}2 .
Find the number formed by the first three digits of bSc. (Here bxc denotes the greatest integer less than or
equal to x and {x} = x − bxc denotes the fractional part of x.)
Now it remains to find their sum. This is calculation; if we are careful, we should get that the sum equals
98
X 1 2 2k − 1
99 + k+ k+ + k+ + ··· + k +
2k 2k 2k
k=1
98
" 2k−1
#
X 1 X
= 99 + k(2k) + a
2k a=0
k=1
98
X 1
= 99 + 2k 2 + k −
2
k=1
98(99)(197) 98(99)
= 99 + 2 + − 48 = 641999.
6 2
a2 + b2 = c2 + d2 = 2008,
ac = bd = 1000.
Solution. Note that since a2 + b2 = c2 + d2 = 2008, we have (a2 + b2 )(c2 + d2 ) = 20082 . Multiplying this
out gives
(ac)2 + (ad)2 + (bc)2 + (bd)2 = 20082 .
Next note that if x and y are two equal numbers then x2 + y 2 = 2xy. In this case, letting x = ac and y = bd
gives (ac)2 + (bd)2 = 2abcd. Therefore
(ac)2 + (ad)2 + (bc)2 + (bd)2 = (ad)2 + 2abcd + (bc)2 = (ad + bc)2 = 20082 ,
so ad + bc = 2008.
Now note that since a2 + b2 = c2 + d2 = ad + bc, we have
ab − cd = ab + ac − ac − cd = a(b + c) − c(a + d)
= a(b + c) + c(b + c) = (a + c)(b + c).
Similarly, ac − bd = (a + d)(c + d) and ad − bc = (a + b)(d + b). Therefore, the second equation becomes
Noting once again that a + b = −(c + d), a + c = −(b + d), and a + d = −(b + c), we can simplify this product
to
−(a + b)2 (a + c)2 (a + d)2 = −5282 =⇒ (a + b)(a + c)(a + d) = 528.
(It is easy to see why the negative solution should be thrown out here.) It remains to maximize the sum of
the three factors on the left hand side, as (a + b) + (a + c) + (a + d) = 3a + b + c + d = 2a, and maximizing
this sum will in turn maximize a.
Lemma 1. Suppose x, y, and z are positive integers such that xyz = c. Then x + y + z ≤ c + 2.
(x − 1)(y − 1) ≥ 0 =⇒ x + y ≤ xy + 1.
x + y + z ≤ xy + z + 1 ≤ xyz + 2 = c + 2
Source. Brilliant.org
David Altizio AIME Solution Set 2015 Page 7
2 Combinatorics
1. A random pizza is made by flipping a fair coin to decide whether to include pepperoni, then doing the same
for sausage, mushrooms, and onions. The probability that two random pizzas have at least one topping in
common can be written in the form mn where m and n are positive integers. Find m + n.
Solution. We first compute the probability that the two random pizzas have no toppings in common. Note
that for any one topping, there is a 43 probability that it is not common to both pizzas (since the probability
of this is 12 · 12 = 14 ). Since there are four toppings, and each of the coin flips is independent, the probability
that two random pizzas have no toppings in common is ( 43 )4 = 256 81
. Hence the probability that the two pizzas
81 175
have at least one topping in common is 1 − 256 = 256 and the requested answer is 431 .
Solution (Zimbalono). Any transposition alters the sum by an even amount. All permutations can be
constructed out of transpositions, so the sum must be even. No element can move more than two steps away
from its original position without making the sum greater than 4. So to create a sum of 4, you need
In the first case, you have 7 + 6 + 5 + 4 + 3 + 2 + 1 = 28, in the second case, you have 8, and in the third case,
you have 8 · 2 = 16. Total of 52 .
Solution. The important part of this problem is that the path can not move to the left in any way, shape,
or form. Once it leaves the first column, it can not traverse back there again. Thus, it is advantageous to
consider each column independently.
Note that there are seven ways to travel from the first column to the second column: meander through either
the three diagonal sides or the four horizontal ones. Once this first column is left, it can be ignored, and the
problem is reduced to determining the number of ways to travel from the second column to the third one.
But note that this is the exact same problem as before! No matter where the path enters the second column,
there are seven ways the path can go to the third column. Similarly, there are seven ways the path can go
from the third to the fourth column, at which point the path drops down to B.
This is thus an algorithm to construct any of the 73 = 343 possible paths.
4. Consider the set S = {1, 2, 3, 4, 5, . . . , 100}. How many subsets of this set with two or more elements satisfy:
(i) the terms of the subset form an arithmetic sequence, and
(ii) we cannot include another element from S with this subset to form an even longer arithmetic sequence?
David Altizio AIME Solution Set 2015 Page 8
Solution. The key idea in this problem is that each subset of S we desire is determined uniquely by the
arithmetic sequence it contains. To prove this, suppose S1 and S2 are two distinct subsets with S1 ⊂ S2 .
Then we can add elements in S2 to the front or back of the arithmetic sequence to obtain S1 , but then S1
and S2 are not distinct, contradiction!
Let a and d be the first term and common difference of the arithmetic sequence in S. We now do casework
based on the value of d.
CASE 1: d ≤ 50. Here, remark that a can take on any of the values 1, 2, . . . , d. This is because if a = d + 1,
then a 1 can be appended to the sequence to get a subset we have already counted. As a result, for every d
there are d possible values of a.
CASE 2: d > 50. In this case, we have to be careful, since there can be only at most two elements in the
subset we desire. Hence S must be one of the sets
Solution. Consider the complete graph with k vertices of all the games played at the competition. There
are two ways to count the total number of points awarded to all players in the tourney. First is the obvious way:
counting with respect to the vertices. Simon and Garfunkle both score 8 points (since from the information
given Garfunkle has 8 wins and some number of losses but no ties for 8 points total), while the other k − 2
competitors get n points for a total of 16 + n(k − 2). However, there’s another way to count the number of
points total: counting with respect to the edges. For every match played, the total number of points goes
up by 1 (since each player
is awarded half a point in a tie). For k players, the number of total matches (and
hence total points) is k2 . Setting these equal to each other gives 16 + n(k − 2) = k2 , or
k
− 16 k 2 − k − 32
2 1 30
n= = = k+1− .
k−2 2(k − 2) 2 k−2
The only integer k greater than nine that make the RHS an integer are 12, 17, and 32. This gives n = 5, 8, 16
and the requested sum is 29 .
6. An ant starts at the origin of a coordinate plane. Each minute, it either walks one unit to the right or one
unit up, but it will never move in the same direction more than twice in the row. In how many different ways
can it get to the point (5,5)?
Solution (Official). We can change the ant’s sequence of moves to a sequence a1 , a2 , . . ., a10 , with ai = 0
if the i-th step is up, and ai = 1 if the i-th step is right. We define a subsequence of moves ai , ai+1 , . . ., aj ,
(i ≤ j) as an up run if all terms of the subsequence are equal to 0, and ai−1 and aj+1 either do not exist or
are not equal to 0, and define a right run similarly. In a sequence of moves, up runs and right runs alternate,
so the number of up rights can differ from the number of right runs by at most one.
David Altizio AIME Solution Set 2015 Page 9
Now let f (n) denote the number of sequences a1 , a2 , . . ., an where ai ∈ {1, 2} for 1 ≤ i ≤ n, and a1 + a2 +
· · · + an = 5. (In essence, we are splitting the possible 5 up moves into up runs, and we are doing the same
with the right moves.) We can easily compute that f (3) = 3, f (4) = 4, f (5) = 1, and f (n) = 0 otherwise.
For each possible pair of numbers of up runs and right runs, we have two choices of which type of run is first.
Our answer is then
7. Thaddeus is given a 2013 × 2013 array of integers each between 1 and 2013, inclusive. He is allowed two
operations:
He would like to get an array where all integers are divisible by 2013. Let M be the number of initial arrays
for which this is possible. What is the number formed by the last three digits of M ?
Solution (Official). We claim that the set of grids on which it is possible to obtain an array of all zeroes
(mod 2013) is indexed by ordered 4025-tuples of residues (mod 2013), corresponding to the starting entries
in the first row and the first column of the grid, giving the answer of 20134025 . To do this, we show that
given after fixing all of the entries in the first row and column, there is a unique starting grid which can
become an array of all zeroes after applying the appropriate operations.
Let ai,j be the entry in the i-th row and j-th column. Suppose there is a sequence of operations giving
all zeroes in the array; let ri be the number of times we operate on row i, and let cj be the number of
times we operate on column j. It is enough to take all of these values to be residues modulo 2013. Clearly,
ai,j + ri + cj ≡ 0 (mod 2013) for each i, j. In particular, r1 + c1 ≡ a1,1 . Now for each i and j we have
ai,j ≡ −ri − cj
≡ (ai,1 + c1 ) + (a1,j + r1 )
≡ ai,1 + a1,j − a1,1 ,
which is fixed. Thus the rest of the entries in the grid are forced.
Conversely, if we set ai,j to be the appropriate representative of the residue class of ai,1 + a1,j − a1,1 modulo
2013, we may take ri ≡ −ai,1 (mod 2013), and cj ≡ a1,1 − a1,j (mod 2013) for each i and j. It is clear that
ai,j + ri + cj ≡ 0 (mod 2013) for each i, j, so we’re done.
8. If you flip a fair coin 1000 times, let P be the expected value of the product of the number of heads and the
number of tails. What are the first three digits of P ?
Solution (yimingz89). Let x denote expected number of heads and n denote the total number of coin
flips (in this case, n = 1000). We’re looking for E(n(n − x)). By linearity of expectation, E(n(n − x)) =
nE(x) − E(x2 ). Recall that Var(x) = E(x2 ) − E(x)2 . Note that the variance for each coin flip is just
1 n 2
4 , so Var(x) = 4 . Plugging into the varience equation and solving for the expected value of x , we get
2
E(x2 ) = n4 + n4 . Therefore,
n n2 n2 − n
n
E(n(n − x)) = n × − + = .
2 4 4 4
OR
David Altizio AIME Solution Set 2015 Page 10
Differentiating f (x, y) partially first with respect to y and then with respect to x yields the new function
998
1000 · 999 x+y
· .
4 2
So, the expected value of the product of the number of heads and tails is just 999 · 250, whose first three digits
are just 249 .
OR
1 1000
Solution (bobthesmartypants). The probability of getting k heads and 1000 − k tails is 21000 k . The
product that this gives is k(1000 − k). Thus, the expected value for this case is
1000
k
k(1000 − k)
21000
and the expected value overall is
1000
X 1000
k
k(1000 − k) .
21000
k=0
Solution. First remark that there are exactly four numbers divisible by 3 to choose from - 3, 6, 9, and 12.
Thus, it must be the case that each one of these goes into its own set, so the sets must be of the form
Now in order to fufill the condition, the sets containing 3 and 9 must have an even number as well. There
are four left to choose from - 2, 4, 8, and 10. It thus suffices to find the number of ways one can place the
remaining eight numbers into the eight slots above such that the sets containing 3 and 9 have at least one
even number.
It turns out it is slightly easier to count the number of configurations which do not satisfy this property - as
we shall see later, this is because the cases are more symmetric. While a classic PIE strategy suffices here, in
reality we can be a bit more clever. Consider the distribution of the even numbers among the four sets. Note
that if the product of the elements of some set is not divisible by 6, then it must not be the case that an even
number appers in all four subsets. This leaves only two possible distributions of even numbers left.
• First suppose two of the sets have two even numbersand the other two have none. There are 5 ways to
choose which two sets get the two even numbers, 42 = 6 ways to split the even numbers between the
two sets, and 42 = 6 ways to split the remaining four numbers between the two remaining sets. This
Source. Unknown
David Altizio AIME Solution Set 2015 Page 12
3 Geometry
1. Regular hexagon ABCDEF is given in the plane. If the area of the triangle whose vertices are the midpoints
of AB, CD, and EF is 225, what is the area of ABCDEF ?
Solution. Suppose s is the side length of the hexagon, and let M , N , and P denote the midpoints of AB,
CD, and EF respectively. Then M N is a midline of trapezoid ABCD, and so M N = 23 s. Thus
√
[ABCDEF ] 6 · s2 3/4 8
= √ = ,
[M N P ] (3s/2)2 3/4 3
8
and so the requested answer is 3 · 225 = 600 .
Source. MATHCOUNTS
S 2 2 2 R
2. In the corners of a square P QRS with side length 6 cm four smaller squares
are placed with side lengths 2 cm. Let us denote their vertices by W, X, Y, Z D 2
like in the picture. A square ABCD is constructed in such a way, that points Z Y
W, X, Y, Z lie inside the sides AB, BC, CD, DA respectively. Find the square
A
of the largest possible distance between points P and D. 2
C
Solution. Let M denote the midpoint of Y Z. Then P M = 5 by
W X
Pythagorean Theorem and M D = 12 · Y Z = 1, and so Triangle Inequal- 2
B
ity dictates that P D2 ≤ 62 = 36 , with equality achieved when P , M , and
D are collinear. P Q
Solution. Let O, O1 , and O2 be the centers of the sphere, the circle with radius 54, and the circle with
radius 66 respectfully. In addition, let M be the midpoint of AB. Note that OO1 is perpendicular to the
plane containing circle O1 , so OO1 ⊥ O1 A. Additionally, since O1 M ⊥ O2 M , we have that OO1 = M O2 .
Therefore,
4. Two circles, ω1 and ω2 , have radii of 5 and 12 respectively, and their centers are 13 units apart. The circles
intersect at two different points P and Q. A line l is drawn through P and intersects the circle ω1 at X 6= P
and ω2 at Y 6= P . Find the maximum value of P X · P Y .
Solution. Let the centers of the circles ω1 and ω2 be O1 and O2 respectively, and let the projections of
O1 and O2 onto XY be M and N , once again respectively. Let θ = ∠XP O1 . Since 4O1 P M is right, we
have P M = O1 P cos θ =⇒ P X = 2O1 P cos θ = 10 cos θ. Furthermore, since O1 O2 = 13, 4O1 P O2 is a right
triangle, which implies that ∠O1 P M and ∠O2 P N are complementary. Thus, N P = O2 P cos π2 − θ =⇒
Y P = 2O2 P sin θ = 24 sin θ. Therefore
P X · P Y = (10 cos θ) · (24 sin θ) = 240 sin θ cos θ = 120 sin 2θ ≤ 120 .
π
Equality holds when θ = 4.
5. Two circles in the Cartesian plane have four common tangent lines. If the slopes of these lines are 2, 3, 4,
and m, in increasing order, then calculate b100mc.
Solution (ahaanomegas). First, notice that the two internal tangents are the ones with slopes 2 and m and
the two external tangents are the ones with slopes 3 and 4. The internal tangents and the external tangents
are symmetric about the line through the centers of the circles. Say that line has slope a. Then we have the
system of equations (
arctan(a) − arctan(3) = arctan(4) − arctan(a),
arctan(a) − arctan(2) = arctan(m) − arctan(a).
a−3 4−a a−2
m−a 29
Using trig identities, we get 1+3a = 1+4a and= 1+ma
1+2a. Solving gives m = 3 . This slope is indeed the
29
largest of the four, so we are done and our answer is 100 · 3 = 966 .
Solution. Let the vertices of the triangle be A, B, and C, with A the vertex of the isosceles triangle. Let
H be the orthocenter and I the incenter of the triangle. Additionally, let D denote the intersection of the
incircle and BC, and let F be the foot of the perpendicular from B to AC.
Suppose that ∠ABC = x. Then ∠F BC = 90◦ − ∠ACB = 90◦ − x. Additionally, since I is the intersection
x ID
of the angle bisectors of the triangle, ∠IBD = . Next note that tan ∠IBD = DB and tan ∠HBD = HD
DB .
2
Plugging in our expressions for x, this gives
◦ HD ID x x
tan(90 − x) = =2 = 2 tan =⇒ cot x = 2 tan .
DB DB 2 2
Rewriting in terms of sines and cosines (and in addition using a tangent half-angle identity) gives
cos x 1 − cos x 2
=2 =⇒ cos x = 2(1 − cos x) =⇒ cos x = .
sin x sin x 3
Finally, we have
4 1
cos ∠BAC = cos(180◦ − 2x) = − cos(2x) = 1 − 2 cos2 x = 1 − 2 = .
9 9
8. Let 4ABC have AB = 6, BC = 7, and CA = 8, and denote by ω its circumcircle. Let N be a point on
ω such that AN is a diameter of ω. Furthermore, let the tangent to ω at A intersect BC at T , and let the
second intersection point of N T with ω be X. The length of AX can be written in the form √mn for positive
integers m and n, where n is not divisible by the square of any prime. Find m + n.
Solution. Note that AT ⊥ AN and AX ⊥ T N√, so it suffices to first compute AT and AN . AN is easier:
7 15
by Law of Cosines cos A = 17 32 =⇒ sin A = 32 . Hence AN = 2R = sin ∠A =
BC √32 . AT , however, is
15
a bit harder; we shall solve for its length for general a, b, c with b > c. Let AT = x and T C = y. From
4ABT ∼ 4CAT we obtain two equations for similarity, x2 = y(y − a) and cy = bx. Multiplying both sides
of the first equation by b2 gives
Scaling back up gives a final value of AX = √96 , and the requested answer is 96 + 199 = 295 .
199
Solution (fedja). Let Dn be the difference in the areas between Pn and Pn+1 . Let our trapezoid be
P1 = ABCD (and [ABCD] = 12(3+13)
2 = 96); then without loss of generality construct diagonal BD.
Let A1 , A2 be the trisection points on AB, AD, respectively, that are closest to A. Then the operation clip(P )
deletes 4A1 AA2 . Since A1 A/AB = 1/3, A2 A/AD = 1/3, and 4A1 AA2 , 4BAD share common ∠A, we have
4A1 AA2 ∼ 4BAD by side ratio 1/3. Their areas are in the ratio (1/3)2 = 1/9.
Similarly, [C1 CC2 ] = 91 [BCD], and [A1 AA2 ] + [C1 CC2 ] = 91 [ABCD]. Cutting along diagonal AC, we get the
same result, so D1 = 29 P1 .
We now consider the effects of the second clipping. Without loss of generality consider what happens along
the vertex A1 of P2 . Let A11 be the trisection point along AB (again closest to A1 ), and A12 be the trisection
point along A1 A2 . Now AAA1 A11
1
= (AB/3)/3
AB/3 = 13 and AA11AA12
2
= 13 , and
Using the 12 ab sin C definition of the area of a triangle, we see that [A1 A11 A12 ] = 19 [AA1 A2 ]. A similar
clipping about A2 gives [A2 A21 A22 ] = 91 [AA1 A2 ]; around each clipped region in D1 , we clip a new area
2/9D1 . Generalizing, we have the recursion Dn = 29 · Dn−1 .
David Altizio AIME Solution Set 2015 Page 15
As a result,
2 n−1 !
2 2 2
Pn = P1 − D1 − D2 − · · · − Dn−1 = 96 − 96 + + ··· + .
9 9 9
Solution (Official). Let the incircle touch sides AC and AB at E and F respectively. Noe that E and F
both lie on the circle with diameter AI since ∠AEI = ∠AF I = 90◦ . The key observation is that D, E, and
P are collinear. To prove this, suppose that P lies outside the triangle (the other case is analogous), then
1 1
∠P EA = ∠P IA = ∠IBA + ∠IAB = (∠B + ∠A) = 90◦ − ∠C = ∠DEC,
2 2
which implies that D, E, and P are collinear. Similarly, D, F , and Q are collinear. Then, by Power of a
Point, DE · DP = DF · DQ, so DP/DQ = DF/DE.
Now we compute DF/DE. Note that
√
p 3
DF = 2DB sin ∠DBI = 2 62 − 32 =3 3
6
and that
p 3 24
DE = 2DC sin ∠DCI = 2 52 − 32 = .
5 5
Therefore, (DF/DE)2 = 75/64 and the requested answer is 139 .
4 Number Theory
1. Jack chose nine different integers from 1 through 19 and found their sum. From the remaining ten integers,
Jill chose nine and found their sum. If the ratio of Jack’s sum to Jill’s sum was 7 : 15, which of the nineteen
integers was chosen by neither Jack nor Jill?
Solution. Let x be a positive integer such that Jack’s integers sum to 7x while Jill’s integers sum to 15x,
and let n be the integer not chosen by either person. Then adding all nineteen integers together gives
Taking (mod 22) of both sides (i.e. considering the remainders of various parts of the equation upon division
by 22) gives n ≡ 190 ≡ 14 (mod 22). Therefore, since n ≤ 19, we must have n = 14 . (Indeed, this scenario
can occur if, for example, Jack picks 2, 3, 4, 5, 6, 7, 8, 9, and 12 while Jill picks 1, 10, 11, 13, 15, 16, 17, 18,
and 19.)
Now it suffices to find two numbers which multiply to 615 and which average to a power of two. Experimen-
tation yields that the only possibility is 615 = 5 · 123, which yields y = 6, x = 59, and x + y = 65 .
0. |00 {z
· · · 0} 11 · · · 1} 00
| {z · · · 0} 11
| {z · · · 1} · · · .
| {z
18 0s 207 1s 18 0s 207 1s
Solution (Official). We observe that g(n) = 2 if and only if n is a prime, since composite numbers all
have at least one proper divisor between 1 and n, making g(n) larger than 2. Therefore g(g(n)) = 2 exactly
when g(n) is a prime. We now count how many times this occurs for 2 ≤ n ≤ 100. Evidently we could have
David Altizio AIME Solution Set 2015 Page 17
g(n) = 2 or g(n) = p for an odd prime p > 2. In the first case n itself must be prime (as we have just seen),
and there are 25 primes from 2 to 100. But there are also cases such as n = 44 whose largest proper divisor
22 is one less than a prime, making g(44) = 23. These cases occur whenever n has the form n = 2(p − 1) for
p an odd prime. There are 14 such values of n, from 2(3 − 1) = 4 through 2(47 − 1) = 92, for a grand total
of 25 + 14 = 39 values of n.
n3 + 7n − 133 = m3
for some positive integer m. What is the sum of all good numbers?
m3 − n3 = 7n − 133 ≥ 3n2 + 3n + 1
since the minimum value of m3 − n3 is when m = n + 1. Thus we reduce the inequality to 3n2 − 4n + 134 ≤ 0,
impossible by checking the discriminant.
If n = m, we see they are both 19.
Now consider when n > m. Clearly
n3 − m3 = 133 − 7n ≥ 3n2 − 3n + 1
since the minimum of n3 − m3 is n3 − (n − 1)3 . Thus, by simplifying the inequality, we find 3n2 + 4n − 132 ≤ 0.
Clearly this restricts n to 1, 2, 3, 4, 5, 6 and we may check them manually to see that (6, 5) and (5, 3) are the
only solutions.
So to conclude, our solutions are (5, 3), (6, 5), and (19, 19) for (n, m).
Source. Unknown
6. How many zeroes occur at the end of the number 19996 + 6 · 1999 + 5?
Solution. Write the number in question as n6 + 6n + 5 for n = 1999. Now remark that this factors as
The (n + 1)2 = 20002 term contributes six factors of 5. With respect to the other term, note that
meaning that it is divisible by 5 but not 25. Thus this term adds exactly one extra factor of 2, meaning that
the desired answer is 7 .
Solution. The key is to note that 37 × 3 = 111, so 103 ≡ 999 + 1 ≡ 1 (mod 37). Hence we can break the
number into blocks of 3 when computing the remainder modulo 37. As an example, the numbers 12345678
and 12 + 345 + 678 are congruent mod 37.
Let a, b, c be the total number of ones that are ones, tens, and hundreds digits in these blocks. (For example,
if N = 110101, then (a, b, c) = (1, 1, 2).) Then since each “units digit” contributes one to the remainder, each
“tens digit” 10, and each “hundreds digit” 100 ≡ −11, we have
We first wish to find the minimum possible value of a + b + c; this will in turn limit our options and leave
only a finite number of cases to check.
David Altizio AIME Solution Set 2015 Page 18
Now it just becomes trial and error. Obviously a + b + c = 1, 2, 3 do not work. If a + b + c = 4, then
and here it’s easy to see that (a, b, c) = (3, 0, 2) works! Hence the smallest number of possible ones is 5 , and
it is easy to see that 1, 101, 101 is the smallest possible construction under this case.
Making the substitution x = 2a + 1, etc, we now come across the simplified equation x2 + y 2 = z 2 + 1. The
one caveat is that all three variables are odd.
We’re trying to find the smallest positive integer that appears in at least six different triples (x, y, z) that satisfy
this equation (as only x or y, NOT z). Let this integer be x. Then rewrite as x2 − 1 = z 2 − y 2 = (z − y)(z + y).
Since both y and z are odd, z − y and z + y are both even and additionally have different residues (mod 4).
Therefore one of these two quantities must have exactly one factor of 2 while the other one must have at least
two. For all odd x, 8|x2 − 1 since a2 ≡ 0, 1, 4 (mod 8) for integer a, so we’ll never have fewer than three
factors of 2 at any point in time. Hence in order to get our set of solutions, we find all solutions in integers
to the equation w = (z − y)(z + y) (where w is the number that results after all powers of two are removed
from the prime factorization of x2 − 1), add these powers of two back, and convert to a PTTN.
Now we have to figure out what to do with all those odd factors. At first glance, it seems like the condition
that x be contained in at least six PTTN’s implies that x2 − 1 must have at least six positive odd divisors.
However, we need to be more strict than this. The pair (y, z) = (1, x) always works as a solution, but y = 1
translates to b = 0, which is not a positive integer! Hence the number of odd positive divisors of x2 − 1
actually has to be at least eight. (It can’t be seven because then x2 − 1 = (p3 )2 for some prime p, but no two
perfect squares differ by 1.)
At this point, it suffices to bash out numbers. (I tried some less-bashy methods to find one solution, but then
David Altizio AIME Solution Set 2015 Page 19
ended up grinding through the whole list anyway to confirm that no smaller solutions existed.)
32 − 1 = 8 = 23 ,
52 − 1 = 24 = 23 × 3,
72 − 1 = 48 = 24 × 3,
92 − 1 = 80 = 24 × 5,
112 − 1 = 120 = 23 × 3 × 5,
132 − 1 = 168 = 23 × 3 × 7,
152 − 1 = 224 = 25 × 7,
172 − 1 = 288 = 23 × 32 ,
192 − 1 = 18 × 20 = 23 × 32 × 5,
212 − 1 = 20 × 22 = 23 × 5 × 11,
232 − 1 = 22 × 24 = 24 × 3 × 11,
252 − 1 = 24 × 26 = 24 × 3 × 13,
272 − 1 = 26 × 28 = 23 × 7 × 13,
292 − 1 = 28 × 30 = 23 × 3 × 5 × 7.
Success! Now for each of the 8 pairs of integers that satisfy z 2 − y 2 = 3 × 5 × 7 = 105, we can partition
powers of two uniquely as mentioned previously to get our set of solutions. Indeed, when x = 29 =⇒ a = 14,
there are at least six PTTN’s that work (namely the seven (14, 104, 105), (14, 33, 36), (14, 18, 23), (11, 14, 18),
(5, 14, 15), (14, 14, 20), and (14, 51, 53)). Hence the smallest natural numbers n that works is 14 .
Proof. Write
k
(1 + x)m = (1 + x)m0 +m1 p+···+mk p
k k
= (1 + x)m0 (1 + x)m1 p · · · (1 + x)mk p ≡p (1 + x)m0 (1 + xp )m1 · · · (1 + xp )mk .
as desired.
Now note that 00 = 10 = 11 = 1 and 01 = 0. Thus, nk is even if and only if there exists a j such that the
j th digit in the binary expansion of n is zero while the j th digit in the binary expansion of k is one. It follows
that the total number of entries in the nth row which are odd is 2f (n) , where f (n) denotes the number of ones
in the binary expansion of n (since for each of these digits we have a choice of 0 or 1 for the corresponding
digit in k, while all other digits are forced).
The condition that row n has 256 odd entries reduces down to n having eight ones in its binary representation.
The number of such integers can be computed (e.g. by complementary counting) to be 153 .
Solution (f ). Suppose n = pk for some positive integer k and p > 3 where p is a prime number. Thus,
φ(n) = pk−1 (p − 1) ≡ 2 (mod 12). Since gcd (p, 12) = 1, we can only have p ≡ 1, 5, 7, 11 (mod 12). If p ≡ 1,
we’d have 0 ≡ 2 (mod 12), no solution. If p ≡ 5, then 5k−1 (4) ≡ 2 (mod 12), no solution, because the RHS
isn’t divisible by 4. If p ≡ 7 (mod 12), then the LHS is divisible by 6, but not the RHS. Hence, we must have
p ≡ 11. This would give us 11k−1 (10) ≡ 2 (mod 12), which reduces to (−1)k−1 ≡ −1 (mod 6), which implies
that k is even.
We must have p < 100 because p2 ≤ 9999 < 10000. The primes congruent to 11 modulo 12 are 11, 23, 47, 59,
71, and 83, so 112 , 232 , 472 , 592 , 712 , and 832 are solutions. But 114 > 104 = 10000 > 9999, so we can’t have
k > 2.
Now let us consider when p = 2. We have φ(2k ) = 2k−1 so we have 2k−1 ≡ 2 (mod 12), implying that k = 2
is the only solution (otherwise 4 divides the LHS and not the RHS). So we have 22 = 4 is a solution.
For p = 3: we have φ(3k ) = 3k−1 · 2 so 3k−1 ≡ 1 (mod 6), implying that k = 1 is the only solution, giving us
3 as a solution.
So now what if n is divisible by multiple primes? Say n = pe11 pe22 · · · pekk . Then, the totient of this would be
for some N ∈ N. If at least two of these primes are odd, then 4 | φ(n), and so no solution exists here. Thus n
must be the product of exactly two primes, with one of them being 2.
In conclusion, our solutions are
3, 4, 112 , 232 , 472 , 592 , 712 , 832 , 2 · 3, 2 · 112 , 2 · 232 , 2 · 472 , 2 · 592 .