Ioqm Mock Solutions
Ioqm Mock Solutions
1. Five men and nine women stand equally spaced around a circle in random
order. The probability that every man stands diametrically opposite a
woman is m n , where m and n are relatively prime positive integers. Find
m + n.
Sol: The problem is equivalent to saying that no two men can be diamet-
rically opposite. First of all, we place the men; note that the first man
can go anywhere, as it’s a circle. 14 positions. The second man has 12
options discounting the first man and the position directly across from
him. Continuing in this manner, we have 14 · 12 · 10 · 8 · 6 to place the
men; the women follow. Next, note the amount of ways to place everyone
at once. As the circle has direction, we can extend it to a line. There are
14!
5 identical men and 9 identical women for a total of 5!9! . Dividing both
values gives our answer of 191.
p √
2. If logb n = logb n and b logb n = logb bn, then the value of n is equal
to kj , where j and k are relatively prime. What is j + k?
1
Sol: Rewrite the first given equation as logb n 2 = 12 · logb n. Letting
1
logb n = a, we have that a 2 = 12 a ⇒ a = 41 a2 ⇒ a2 − 4a = 0 ⇒ a = 4.
Using the second equation and rewriting, b · a = 1 + a ⇒ 4b = 5 ⇒ b = 54 .
625
And, since a = 4, this means that n = ba = b4 = 256 ⇒ 881 .
3. The sum of all positive integers m for which 13! m is a perfect square can be
written as 2a 3b 5c 7d 11e 13f , where a, b, c, d, e, and f are positive integers.
Find a + b + c + d + e + f .
Sol: first note 13! = 210 · 35 · 52 · 7 · 11 · 13. This implies that m =
2a1 · 3a2 · 5a3 · 7 · 11 · 13 for nonnegative integers a1 , a2 , a3 . We must have
a1 is even and ≤ 10, a2 is odd and ≤ 5, a3 is even and ≤ 2.We get that
the sum of all m is
1
You can count that there are 12 (not necessarily distinct) primes here, so
we are done.
5. Rhombus ABCD has ∠BAD < 90◦ . There is a point P on the incircle
of the rhombus such that the distances from P to lines DA, AB, and BC
are 9, 5, and 16, respectively. Find the perimeter of ABCD.
Sol: Let l be the line through P perpendicular to AD and m be the line
through P perpendicular to AB.
The height of the rhombus is 9 + 16 = 25, so the distance from P to
CD is 20 and the inradius r is 25 2 . Let X and Y be the feet of the
perpendiculars from I, the incenter, to l and m, respectively. Then by
cyclic quadrilaterals, ∠DAB = ∠XIY .
25
Since P I = r = 2 and P X = 16 − r = 72 , we have tan ∠XIP = 7
24 . Sim-
3 7
3 4 + 24 4
ilarly, tan ∠Y IP = 4, so tan ∠DAB = tan ∠XIY = 3·7
1− 4·24
= 3 . Thus,
csc ∠DAB = 54 , so AD = 25 · 5
4 = 125
4 . The perimeter is 125 .
6. Find the number of subsets of 1, 2, 3, ..., 10 that contain exactly one pair of
consecutive integers. Examples of such subsets are 1, 2, 5 and 1, 3, 6, 7, 10.
Sol: We have the following crucial claim: Claim. The number of subsets
of {k, k +1, . . . , k +n−1} without two consecutive numbers is Fn+2 , where
Fn is the nth Fibonacci number. Proof. Note that this is true for n = 0, 1,
so it suffices to show that the sets satisfy the Fibonacci recurrence. Let
the desired value be Sn . If k + n − 1 is not in our set, we have Sn−1
possible ways to fill the rest. Otherwise, if k + n − 1 is in our set, k + n − 2
is not, so thus we have Sn−2 possible ways to fill the rest. Thus,
Sn = Sn−1 + Sn−2
2
as desired. □
Now, to finish, if the consecutive numbers are m, m + 1, then m − 1, m +
2 are not in the subset. Then, the rest is subsets of {1, . . . , m − 2}
and {m + 3, . . . , 10} with no two consecutive numbers, for a total of
Fm−2+2 F10−m−2+2 = Fm F10−m . Thus, the answer is
9
X
Fm F10−m = 1·34+1·21+2·13+3·8+5·5+8·3+13·2+21·1+34·1 = 235
m=1
9. The number of apples growing on each of six apple trees form an arithmetic
sequence where the greatest number of apples growing on any of the six
trees is double the least number of apples growing on any of the six trees.
3
The total number of apples growing on all six trees is 990. Find the
greatest number of apples growing on any of the six trees.
Sol: Let the smallest tree have x apples and the biggest tree have 2x
3x
apples.This arithmetic sequence has sum 6( ) = 990 so x = 110. So the
2
biggest tree has 2x = 220 apples
10. Let x, y, and z be real numbers satisfying the system of equations
xy + 4z = 60
yz + 4x = 60
zx + 4y = 60.
Let S be the set of possible values of x. Find the sum of the squares of
the elements of S
Sol: First notice 60x − 4x2 = 60y − 4y 2 = 60z − 4z 2 = xyz. Since any
parabola and a horizontal line intersect at most twice, we can assume
WLOG that up to cyclic rotation that x = y. If z = 15 − x then we
have x2 − 4x = 0 so x = 0, 4 and if z = x then we have x2 + 4x = 60 so
x = −10, 6.
Together, these give solutions {(4, 4, 11), (4, 11, 4), (11, 4, 4), (−10, −10, −10), (6, 6, 6)}
so the answer is 42 + 112 + (−10)2 + 62 = 273
11. Find number of positive integer triples (x, y, z) that satisfy the equation
x4 + y 4 + z 4 = 2x2 y 2 + 2y 2 z 2 + 2z 2 x2 − 63.
z 7 = z 3 + 2z 2 + z = 2z 2 − 1.
4
It follows that
13. Circles ω1 and ω2 intersect at two points P and Q, and their common
tangent line closer to P intersects ω1 and ω2 at points A and B, respec-
tively. The line parallel to line AB that passes through P intersects ω1
and ω2 for the second time at points X and Y , respectively. Suppose
PX√ = 10, P Y = 14, and P Q = 5. Then the area of trapezoid XABY is
m n where m and n are positive integers and n is not divisible by the
square of any prime. Find m + n
Sol: Let ℓ ≡ AB be the common tangent and m ≡ AB be the line in the
problem statement parallel to ℓ. Let M be the midpoint of AB, and let
D, E, and F be the projections of A, M , and B, respectively, onto line m.
Since ℓ ∥ m, triangles XAP and Y BP are isosceles, so D is the midpoint of
XP and F is the midpoint of Y P . This implies AB = DF = 21 XY = 12,
and hence AM = M B = 6.
Since the power of M with respect to ω1 equals the power of M with
respect to ω2 , M lies on the radical axis of these two circles; that is, M
lies on line P Q. Computing this power in two different ways yields
36 = AM 2 = M P · M Q = M P (M P + 5).
This means M P = 4.
√
Finally, observe that DE = EF = 6, so P E = 1 and M E = 15. It
follows that the area of trapezoid XABY is
1 √ √
(12 + 24) 15 = 18 15.
2
The requested answer is 18 + 15 = 33
14. Selena is thinking of an integer between 1 and 50, inclusive. Charlie
can choose a positive integer m and ask Selena: ”Does m divide your
number?”, to which Selena must answer truthfully. Charlie continues
asking these questions until he determines Selena’s number. What is the
minimum number of questions that Charlie needs to guarantee this?
Sol: Basically ask prime powers as follows: - start with 2, - if currently pk
divides, ask pk+1 , - if does not divide, ask next prime. There are 15 prime
between 1 and 50. So the correct answer is 15 .
15. Find number of pairs of primes (p, q) for which p − q and pq − q are both
perfect squares.
Sol: We first consider the case where one of p, q is even. If p = 2, p − q = 0
and pq − q = 2 which doesn’t satisfy the problem restraints. If q = 2, we
5
can set p − 2 = x2 and 2p − 2 = y 2 giving us p = y 2 − x2 = (y + x)(y − x).
This forces y − x = 1 so p = 2x + 1 → 2x + 1 = x2 + 2 → x = 1 giving us
the solution (p, q) = (3, 2).
Now assume that p, q are both odd primes. Set p − q = x2 and pq − q = y 2
so (pq−q)−(p−q) = y 2 −x2 → p(q−1) = (y+x)(y−x). Since y+x > y−x,
p|(x + y). Note that q − 1 is an even integer and since y + x and y − x
have the same parity, they both must be even. Therefore, x + y = pk for
some positive even integer k. On the other hand, p > p − q = x2 → p > x
and p2 − p > pq − q = y 2 → p > y. Therefore, 2p > x + y so x + y = p,
giving us a contradiction.
Therefore, the only solution to this problem is (p, q) = (3, 2). So the
correct answer is 1 .
16. Find the least positive integer n such that when 3n is written in base 143,
its two right-most digits in base 143 are 01.
Sol: We wish to find the smallest n such that 3n ≡ 1 (mod 1432 ), so
we want n ≡ 1 (mod 121) and n ≡ 1 (mod 169). Note that 35 ≡ 1
(mod 121), so 3n repeats 121 with a period of 5, so 5|n. Now, in order
for n ≡ 1 (mod 169), then n ≡ 1 (mod 13). Because 33 ≡ 1 (mod 13), 3n
repeats with a period of 3, so 3|n. Hence,
we have that for somep positive
integer p, 3n ≡ (33 )p ≡ (26 + 1)p ≡ p0 26p + p1 26p−1 .... + p−2
2
26 +
p p
p−1 26 + p ≡ 26p + 1 ≡ 1 (mod 169), so 26p ≡ 0 (mod 169) and p ≡ 0
(mod 13). Thus, we have that 5|n, 3|n, and 13|n, so the smallest possible
value of n is 3 × 5 × 13 = 195 .
17. For every subset T of U = {1, 2, 3, . . . , 18}, let s(T ) be the sum of the
elements of T , with s(∅) defined to be 0. If T is chosen at random among
all subsets of U , the probability that s(T ) is divisible by 3 is m
n , where m
and n are relatively prime positive integers. Find m.
Sol: Consider the numbers {1, 4, 7, 10, 13, 16}. Each of those arecongruent
to 1 (mod 3). There is 60 = 1 way to choose zero numbers 61 = 6 ways
to choose 1 and so on. There ends up being 60 + 63 + 66 = 22 possible
6
Sol: Let En denotes the number of sequences with length n that ends at
E. Define similarly for the other vertices. We seek for a recursive formula
for En .
En = P3n−1 + P4n−1
= P2n−2 + P5n−2
= P1n−3 + P3n−3 + Sn−3 + P4n−3
= (P3n−3 + P4n−3 ) + Sn−3 + P1n−3
= En−2 + Sn−3 + P1n−3
= En−2 + P1n−4 + P5n−4 + Sn−4 + P2n−4
= En−2 + (Sn−4 + P1n−4 ) + P4n−4 + P2n−4
= En−2 + (En−1 − En−3 ) + Sn−5 + P5n−5 + P1n−5 + P3n−5
= En−2 + (En−1 − En−3 ) + (Sn−5 + P1n−5 ) + (P5n−5 + P3n−5 )
= En−2 + (En−1 − En−3 ) + (En−2 − En−4 ) + En−4
= En−1 + 2En−2 − En−3
7
Y . Circle ω passes through A and B intersecting ω1 again at D ̸= A and
intersecting ω2 again at C ̸= B. The three points C, Y , D are collinear,
XC = 67, XY = 47, and XD = 37. Find AB 2 .
Sol: Let Z = XY ∩AB. By the radical axis theorem AD, XY, BC are con-
current, say at P . Moreover, △DXP ∼ △P XC by simple angle chasing.
Let y = P X, x = XZ. Then
y 67
= =⇒ y 2 = 37 · 67.
37 y
x(y − x) = 14 AB 2 , and
1 2
x(47 + x) = 4 AB
Solving, we get
1 2
4 AB = 12 (y − 47) · 12 (y + 47) =⇒
AB 2 = 37 · 67 − 472 = 270
21. Find the number of positive integers m for which there exist nonnegative
integers x0 , x1 , . . . , x2011 such that
2011
X
mx0 = mxk .
k=1
Sol: mx0 = mx1 + mx2 + .... + mx2011 . Now, divide by mx0 to get 1 =
mx1 −x0 + mx2 −x0 + .... + mx2011 −x0 . Notice that since we can choose
all nonnegative x0 , ..., x2011 , we can make xn − x0 whatever we desire.
WLOG, let x0 ≥ ... ≥ x2011 and let an = xn − x0 . Notice that, also,
ma2011 doesn’t matter if we are able to make ma1 + ma2 + .... + ma2010
1 x
equal to 1 − m for any power of x. Consider m = 2. We can achieve
x
a sum of 1 − 21 by doing 12 + 14 + ... (the ”simplest” sequence). If we
don’t have 12 , to compensate, we need 2 · 1 41 ’s. Now, let’s try to generalize.
1
The ”simplest” sequence is having m m − 1 times, m12 m − 1 times, . . ..
To make other sequences, we can split m − 1 m1i s into m(m − 1) mi+1 1
Ps
1 1
since m · mi+1 · = m(m − 1) · mi . Since we want 2010 terms, we have
(m − 1) · mx = 2010. However, since we can set x to be anything we want
(including 0), all we care about is that m − 1|2010 which happens 016
times.
22. Let z1 , z2 , z3 , . . . , z12 be the 12 zeroes of the polynomial z 12 − 236 . For
each j, let wj be one of zj or izj . Then the maximum possible value of
P12 √
the real part of j=1 wj can be written as m + n where m and n are
positive integers. Find m + n.
8
Sol: The equation z 12 − 236 = 0 can be factored as follows:
Since this is a 12th degree equation, there are 12 roots. Also, since each
term in the equation is even, the positive or negative value of each root is
another root. That would mean there are 6 roots that can be multiplied
by −1 and since we have 6 factors, that’s 1 root per factor. We just need
to solve for z in each factor and pick whether or not to multiply by i and
−1 for each one depending on the one √ that yields the
√ highest real value.
After that process, we get 8 + 8 + 2((4 3 + 4) + (4 3 − 4)) Adding the
√ √
values up yields 16 + 16 3, or 16 + 768, and 16 + 768 = 784 .
23. Nine delegates, three each from three different countries, randomly select
chairs at a round table that seats nine people. Let the probability that
each delegate sits next to at least one delegate from another country be
m
n , where m and n are relatively prime positive integers. Find m + n. Sol:
Use complementary probability and Principle of Inclusion-Exclusion. If
we consider the delegates from each country to be indistinguishable and
number the chairs, we have
9! 9·8·7·6·5·4
= = 6 · 8 · 7 · 5 = 30 · 56
(3!)3 6·6
Among these there are 3 × 9 × 4 ways for candidates from two countries
to each sit together. This comes to 27 · 4.
Finally, there are 9×2 = 18. ways for the candidates from all the countries
to sit in three blocks (9 clockwise arrangements, and 9 counter-clockwise
arrangements).
So, by PIE, the total count of unwanted arrangements is 27·20−27·4+18 =
16 · 27 + 18 = 18 · 25. So the fraction
m 30 · 56 − 18 · 25 56 − 15 41
= = = .
n 30 · 56 56 56
Thus m + n = 56 + 41 = 097 .
9
24. Let P (x) = x2 − 3x − 9. A real number x is chosen
p at random
p from
the interval 5√ ≤ x ≤ 15. The probability that ⌊ P (x)⌋ = P (⌊x⌋) is
√ √
a+ b+ c−d
equal to e , where a, b, c, d, and e are positive integers. Find
y 2 −45
a + b + c + d + e. Sol: Make the substitution y = 2x − 3, so P (x) = 4 .
We’re looking for solutions to
s
r 2 2
y − 45 ⌊y⌋ − 45
=
4 4
with the new bounds y ∈ [7, 27]. Since the left side is an integer, it must
2
be that ⌊y⌋ 4−45 is a perfect square. For simplicity, write ⌊y⌋ = a and
10
25. For each positive integer p, let b(p) denote the unique positive integer
√
k such that |k − p| < 12 . For example, b(6) = 2 and b(23) = 5. If
P2007
S = p=1 b(p), find the remainder when S is divided by 1000.
2 2
Sol: k − 21 = k 2 − k + 41 and k + 12 = k 2 + k + 14 . Therefore b(p) = k
if and only if p is in this range, or k 2 − k < p ≤ k 2 + k. There are 2k
2
numbers
√ in this range, so the sum of b(p) over this range is (2k)k = 2k .
44 < 2007 < 45, so all numbers 1 to 44 have their full range. Summing
this up with the formula for the sum of the first n squares ( n(n+1)(2n+1)
6 ),
P44
we get k=1 2k 2 = 2 44(44+1)(2∗44+1)
6 = 58740. We need only consider the
740 because we are working with modulo 1000.
Nowl considerm the range of numbers such that b(p) = 45. These numbers
2 2
are 44 +45
2 = 1981 to 2007. There are 2007 − 1981 + 1 = 27 (1 to be
inclusive) of them. 27 ∗ 45 = 1215, and 215 + 740 = 955
11
27. Call a permutation a1 , a2 , . . . , an of the integers 1, 2, . . . , n quasi-increasing
if ak ≤ ak+1 + 2 for each 1 ≤ k ≤ n − 1. For example, 53421 and 14253
are quasi-increasing permutations of the integers 1, 2, 3, 4, 5, but 45123 is
not. Find the number of quasi-increasing permutations of the integers
1, 2, . . . , 7.
Sol: The simple recurrence can be found.
When inserting an integer n into a string with n − 1 integers, we notice
that the integer n has 3 spots where it can go: before n − 1, before n − 2,
and at the very end.
EXAMPLE: Putting 4 into the string 123: 4 can go before the 2: 1423,
Before the 3: 1243, And at the very end: 1234.
Only the addition of the next number, n, will change anything.
Thus the number of permutations with n elements is three times the num-
ber of permutations with n − 1 elements.
Start with n = 3 since all 6 permutations work. And go up: 18, 54, 162, 486.
Thus for n = 7 there are 2 ∗ 35 = 486 permutations.
28. For each integer n ≥ 3, let f (n) be the number of 3-element subsets of the
vertices of the regular n-gon that are the vertices of an isosceles triangle
(including equilateral triangles). Find the sum of all values of n such that
f (n + 1) = f (n) + 78.
Sol: Considering n (mod 6), we have the following formulas:
n(n−4)
Even and a multiple of 3: 2 + n3
Even and not a multiple of 3: n(n−2)
2
12
When n is even there are n(n−2)
2 satisfactory subsets (This can be chosen
with n choices for the not-base vertex, and n−2
2 for the pair of equal sides
as we have n−1 edges to choose from, one of them which is not satisfactory
(the bisecting edge), and we must divide by 2 for over-count).
When n is a multiple of three we additionally over-count equilateral tri-
angles, of which there are n3 . As we count them three times, we are two
times over, so we subtract 2n3 .
Considering the six possibilities n ≡ 0, 1, 2, 3, 4, 5 (mod 6) and solving,
we find that the only valid solutions are n = 36, 52, 157, from which the
answer is 36 + 52 + 157 = 245 .
√
29. Find the sum of all positive integers n such that n2 + 85n + 2017 is an
integer.
√ √
Sol: Manipulating the given expression, n2 + 85n + 2017 = 21 4n2 + 340n + 8068 =
1
p
2 (2n + 85)2 + 843. The expression under the radical must be an square
number for the entire expression to be an integer, so (2n+85)2 +843 = s2 .
Rearranging, s2 − (2n + 85)2 = 843. By difference of squares, (s − (2n +
85))(s + (2n + 85)) = 1 × 843 = 3 × 281. It is easy to check that those are
all the factor pairs of 843. Considering each factor pair separately, 2n + 85
is found to be 421 and 139. The two values of n that satisfy one of the
equations are 168 and 27. Summing these together gives us the answer ;
168 + 27 = 195 .
30. A special deck of cards contains 49 cards, each labeled with a number
from 1 to 7 and colored with one of seven colors. Each number-color
combination appears on exactly one card. Sharon will select a set of eight
cards from the deck at random. Given that she gets at least one card of
each color and at least one card with each number, the probability that
Sharon can discard one of her cards and still have at least one card of
each color and at least one card with each number is pq , where p and q are
relatively prime positive integers. Find p + q.
Sol: Without loss of generality, assume that the 8 numbers on Sharon’s
cards are 1, 1, 2, 3, 4, 5, 6, and 7, in that order, and assume the 8 colors
are red, red, and six different arbitrary colors. There are 82 − 1 ways of
assigning the two red cards to the 8 numbers; we subtract 1 because we
cannot assign the two reds to the two 1’s. In order for Sharon to be able
to remove at least one card and still have at least one card of each color,
one of the reds have to be assigned with one of the 1s. The number of
ways for this to happen is 2 · 6 = 12. Each of these assignments is equally
likely, so desired probability is 812−1 = 49 =⇒ 4 + 9 = 13 = 013 .
(2)
13