Math 194, problem set #3, SOLUTIONS
(1) For which integers n is (n3 − 3n2 + 4)/(2n − 1) an integer?
(Andreescu & Gelca)
27
Solution: Dividing, we have (n3 − 3n2 + 4)/(2n − 1) = 81 (4n2 − 10n − 5 + 2n−1
). This
will certainly not be an integer unless (2n − 1)|27, which reduces our candidates for n to
14, 5, 2, 1, 0, −1, −4, and −13. For each candidate, we can verify that the right-hand side is
indeed an integer.
(2) Is it possible to place 1995 different positive integers around a circle so that for any two
adjacent numbers, the ratio of the larger to the smaller is a prime?
(Moscow Mathematical Olympiad)
Solution: It is not possible. Since the ratio of adjacent integers is prime, the number of
prime factors (counting multiplicity) of adjacent integers must be of opposite parity. Since
1995 is odd, we cannot have alternating parity around a circle of 1995 objects.
(3) Let p be a prime number. Prove that there are infinitely many multiples of p whose last 10
digits are all distinct.
(International Mathematical Olympiad)
Solution: For p = 2 or 5, 9876543210+k·1010 satisfies our hypotheses for any positive integer
k. For any other prime, there is some x ≡ 0 (mod p) and x ≡ 9876543210 (mod 1010 ) by
the Chinese Remainder Theorem. We then have that x + kp · 1010 satisfies our hypotheses
for any sufficiently large positive integer k.
(4) If the last 4 digits of a perfect square are equal, prove that they are all zero.
(Andreescu & Gelca)
Solution: Suppose s is a square with its last four digits equal to d. Since s is a square, s ≡ 0, 1,
or 4 (mod 8), and so d ∈ {0, 4, 7, 8}. Also, s ≡ 0, 1, or 4 (mod 5), and so d ∈ {0, 4}. Finally,
if d = 4, then s/4 is a square with last two digits equal to 1, which is impossible modulo 4.
Thus d = 0.
(5) Prove that the sequence 2n − 3, n ≥ 2, contains an infinite subsequence whose terms are
pairwise relatively prime.
(Andreescu
& Gelca)
Qn
Solution: Consider the sequence sn defined by s1 = 5, and for n ≥ 1, sn+1 = 2φ( i=1 si ) − 3,
where φ is Qthe Euler φ-function. Since
Q each sn is odd, by Euler’s Theorem (see Larson,
n
p. 148), 2φ( i=1 si ) − 3 ≡ −2 (mod ni=1 si ). Hence sn+1 is relatively prime to each si with
1 ≤ i ≤ n, and so the sequence sn is a subsequence of 2n − 3, n ≥ 2, that satisfies our
hypotheses.
2
(6) If n, a, b are positive integers, show that gcd(na − 1, nb − 1) = ngcd(a,b) − 1.
Solution (different from the one given in class): Let g = gcd(a, b), a = a0 g, b = b0 g, and
0
0
m = ng so that we may rewrite our desired result as gcd(ma − 1, mb − 1) = m − 1. We
0
0
see that m − 1 divides both ma − 1 and mb − 1, so we must show that it is the greatest
common divisor. Since gcd(a0 , b0 ) = 1, there exist x and y such that a0 x − b0 y = 1. Consider
0
0
mb y − 1
ma x − 1
0
0
0
(m − 1) a0
− (mb − 1) b0
m = ma x − 1 − m(mb y − 1) = m − 1.
m −1
m −1
a0
0
Since
ma x −1
ma0 −1
0
and
mb y −1
mb0 −1
0
0
are both integers, we have that m − 1 = gcd(ma − 1, mb − 1).
(7) We say that a lattice point (x, y) ∈ Z2 is visible from the origin if x and y are relatively
prime. Prove that for every positive integer n there is a lattice point (a, b) whose distance
from every visible point is greater than n.
(American Mathematical Monthly 1977)
2
Solution:
Qmlet pi,j for 1 ≤ i, j ≤ m be m distinct primes. Also let
Qm Let m = 2n + 1, and
Cj = i=1 pi,j and let Ri = j=1 pi,j . Then, by the Chinese Remainder Theorem, there
exist x and y such that x ≡ −j (mod Cj ) for all 1 ≤ j ≤ m and y ≡ −i (mod Ri ) for all
1 ≤ i ≤ m. For any 1 ≤ i, j ≤ m, notice that x + j ≡ 0 (mod Cj ) and y + i ≡ 0 (mod Ri );
thus since pi,j |Cj and pi,j |Ri , we have that the point (x + j, y + i) is not visible from the
origin. Hence the point (x+n+2, y +n+2) is in the center of an m×m square of non-visible
points, and so its distance from every visible point is greater than n.
(8) Prove that there is no integer that is doubled when the first (leftmost) digit is transferred
to the end.
(USSR Olympiad)
Solution: Suppose x is such an integer with n digits and first digit d. Then 2x = 10(x − d ·
10n−1 ) + d. Reducing this equation modulo 8, we have d · 2n ≡ d (mod 8). Since n > 0, this
implies that d ≡ 0 (mod 8); however, d cannot be 0, and if d = 8 then 2x would have n + 1
digits, a contradiction.
3
(9) Fix an integer b ≥ 3. Let f (1) = 1, and for each n ≥ 2, define f (n) = nf (d), where d is the
number of base-b digits of n. Show that the sum
∞
X
1
n=1
f (n)
diverges.
Solution: Suppose the sum converges. Thus
d
(part of A-6, Putnam 2002)
d
∞
∞ bX
−1
∞
b −1
X
X
X
1
1
1 X 1
=
=
.
f
(n)
f
(n)
f
(d)
n
d−1
d−1
n=1
d=1
d=1
n=b
n=b
Treating the sum of 1/n as a left-hand Riemann sum approximation of the integral of 1/x,
we have
d −1
Z bd
bX
1
1
>
dx = ln(b).
n
d−1 x
b
d−1
n=b
Thus
∞
∞
X
X
1
1
> ln(b)
.
f (n)
f (d)
n=1
d=1
Since ln(b) > 1, this is a contradiction, and so the sum diverges.
(10) If n is a positive integer, prove that n! is not divisible by 2n .
(Mathematics Competition, Soviet Union 1971)
Solution: For any positive integers k and n, the number of multiples of k between 1 and n is
bn/kc. To count the number of times 2 divides n!, we should count one 2 for each multiple
of 2 up through n, one more 2 for each multiple of 4 up through n, and in general, one more
2 for each multiple of 2j for all possible j. Thus, the number of 2s that divide n! is
∞ j
∞
X
nk X n
<
= n.
2j
2j
j=1
j=1
© Copyright 2026 Paperzz