Maths Olympiad Prep

Library / Hellenic Mathematical Olympiad /31 of 57

Hellenic Mathematical Olympiad

Number theory Difficulty 6.2 National Olympiad Prove it Greece

For the various values of the positive integer nn, determine all positive integers NN which are perfect squares and in their decimal representation have nn times the digit 22 and one time the digit 55.

Solution

Answer: 52=255^2 = 25 and 252=22525^2 = 225.

Proof. Since a perfect square cannot have its last digit 22, NN must be of the form:
N=22…225=22…200+25=100⋅2⋅11…1+25=100⋅2⋅10n−1−19+25, N = 22\dots 225 = 22\dots 200 + 25 = 100 \cdot 2 \cdot 11\dots 1 + 25 = 100 \cdot 2 \cdot \frac{10^{n-1} - 1}{9} + 25,
where the digit 22 there exists nn times, n≥1n \ge 1.

Working mod 1010, then N=(10k+v)2N = (10k + v)^2, 0≤v<100 \le v < 10, where kk is a positive integer, we can see that only in the case N=(10k+5)2N = (10k + 5)^2 results a positive integer leading to 2525. Then we have
100⋅2⋅10n−1−19+25=(10k+5)2,(1) 100 \cdot 2 \cdot \frac{10^{n-1}-1}{9} + 25 = (10k + 5)^2, \quad (1)
or equivalently
9k2+9k−2(10n−1−1)=0.(2) 9k^2 + 9k - 2(10^{n-1} - 1) = 0. \quad (2)
Since kk is a positive integer, the discriminant of the equation (2) must be perfect square, that is Δ=9(8⋅10n−1+1)\Delta = 9(8 \cdot 10^{n-1} + 1) must be perfect square. Thus we must have
8⋅10n−1+1=x2, 8 \cdot 10^{n-1} + 1 = x^2,
for some odd integer x>1x > 1. If x=2m+1x = 2m + 1, m≥1m \ge 1, then:
8⋅10n−1=x2−1=(x−1)(x+1)=4m(m+1)⇒ 8 \cdot 10^{n-1} = x^2 - 1 = (x - 1)(x + 1) = 4m(m + 1) \Rightarrow
2n⋅5n−1=m(m+1),(3) 2^n \cdot 5^{n-1} = m(m + 1), \quad (3)
with (m,m+1)=1(m, m + 1) = 1. We distinguish cases with respect to nn:

* If n=1n = 1, then m=1m = 1, k=0k = 0 and N=25N = 25.
* If n=2n = 2, then m=4m = 4, k=1k = 1 and N=225N = 225.
* If n≥3n \ge 3, since 5n−1>4n−1=22n−2>2n5^{n-1} > 4^{n-1} = 2^{2n-2} > 2^n,
from equation (3) we get:
2n=m and 5n−1=m+1, 2^n = m \text{ and } 5^{n-1} = m + 1,
and so m=5n−1−1=4⋅(5n−2+⋯+1)>4⋅4n−2=4n−1>2n=mm = 5^{n-1} - 1 = 4 \cdot (5^{n-2} + \cdots + 1) > 4 \cdot 4^{n-2} = 4^{n-1} > 2^n = m, absurd.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.