Mock Test Solutions
Devansh Kumar Tripathi
October 2024
1 Mock-4
1.1 P-6
Find all pairs (m, n) of nonnegative integers for which
m2 + 2 · 3n = m 2n+1 − 1 .
1.2 Solution-1
n
Taking mod m, we get m | 2 × 3n . Since if (m, n) is a solution, 2×3
m , n is also
a solution, so WLOG assume m = 3a . Then we have 3a + 2 × 3n−a = 2n+1 − 1.
If either a < 3 or n − a < 3, it is easy to check that (a, n) = (2, 3), (2, 5) are
the only solutions by simple bounding. So now assume both a and n − a are at
least 3. Taking mod 27, we get 18 | n + 1. If a ≤ n − a, then 3a + 2 × 3n−a =
3a (1+2×3n−2a ). Taking mod 19, we get 19 | RHS, so 19 | 1+2×3n−2a n−2a ≡ 2
(mod 18). Taking mod 7, 7 | 1 + 2 × 3n−2a n − 2a ≡ 1 (mod 6). Contradiction!
Now if a > n − a, 3a + 2 × 3n−a = 3n−a (32a−n + 2). Similarly, taking mod 19,
we get 19 | 32a−n + 22a − n ≡ 16 (mod 18) and taking mod 7 gives 2a − n ≡ 5
(mod 6). Contradiction! So (2, 3), (2, 5) are the only solutions for (a, n), so
(m, n) = (9, 3), (6, 3), (9, 5), (54, 5).
1.3 Solution-2
As the equation is a quadratic in m for any fixed n, we will show that n ∈
/ {3, 5}
do not work. Taking the discriminant, it’s equivalent to solving
2 2
t2 = 2n+1 − 1 − 4 · 2 · 3n ⇐⇒ 8 · 3n = 2n+1 − 1 − t2 .
The right-hand side factors as a difference of squares, where both factors sum
to 2(2n+1 − 1). In particular, these factors have the same parity, and thus must
be of the form 2 · 3a and 4 · 3b , for nonnegative integers a, b with a + b = n.
Rearranging, we obtain
2a+b+1 − 1 = 3a + 2 · 3b .
1
We have solutions (a, b) = (2, 1) and (a, b) = (2, 3), which corresponds to n = 3
and n = 5 above. Manual inspection reveals no other solutions with min(a, b) ≤
2, so we will suppose min(a, b) > 3 and derive a contradiction. Taking modulo
8, we find a is even and b is odd (hence unequal). The idea is that the exponent
a b
of 3 is much too
a+b+1
large in the above equation. Indeed, min(a, b) ≤ ν3 (3 +2·3 ) =
ν3 2 −1
a+b+1
= ν3 4 2 − 1 = 1 + ν3 a+b+1
2
≤ 1 + log3 a+b+1
2 ≤ 1 + log3 (max{a, b})
min(a,b)−1
max(a, b) ≥ 3 .
Intuitively, this is way too big. We write 2max(a,b)+min(a,b)+1 = 2a+b+1 = 1 +
3a + 2 · 3b > 3max(a,b)
max(a,b) 3min(a,b)−1
2min(a,b)+1 > 32 ≥ 32 which is false for min(a, b) ≥ 3, as
desired. The answer is (m, n) ∈ {(9, 3), (6, 3), (9, 5), (54, 5)}.
2 Mock-5
2.1 P-5
Find all functions f : R → R such that
(x + y 2 )f (yf (x)) = xyf (y 2 + f (x))
, where x, y ∈ R
2.2 Solution
If f (x) = const we have f (x) = 0.Now we handle the case f (x) ̸= const.
2 2
We have f is injective,because f (x1 ) = f (x2 ) we have: x1x+y
1y
= x2x+y
2y
so
2
y
y 2 (x1 − x2 ) = 0 so x1 = x2 . now P ( y−1 , y) so we have f (yf (x)) = f (y 2 + f (x))
2
y y2 y2
so yf (x) = y 2 + f (x) so f ( y−1 ) = y−1 now set set y−1 = z so setting y1 =
√
−z+ z 2 +4z
2 we have f (z) = z for all z except −4 < z < 0.Now we will prove
f (x) = x ∀x ∈ R. P (x, y) where −4 < x < 0, we could pick large enough |y| such
that both yf (x) and y 2 + f (x) are not in interval (−4, 0) so f (yf (x)) = yf (x)
and f (y 2 + f (x)) = y 2 + f (x) so we have: y 3 f (x) = y 3 x so f (x) = x ∀x ∈ R.