Olympiad Maths Prep

Track / Stage 6 / 10 of 400 #1010 of 2000

Problem 1010

National olympiad, first round
Number theory Difficulty 6.0 Prove it ASU · Soviet Union

Problem:

Prove that a 9 digit decimal number whose digits are all different, which does not end with 5 and or contain a 0, cannot be a square.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

Solution:

Let NN be a 9-digit decimal number whose digits are all different, does not end with 55, and does not contain a 00.

First, since NN has 9 digits, and all digits are different and nonzero, the digits must be 1,2,3,4,5,6,7,8,91,2,3,4,5,6,7,8,9 in some order.

Let us consider the sum of the digits:

1+2+3+4+5+6+7+8+9=45 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45

So NN is a permutation of 11 through 99, and its digit sum is 4545.

A square number modulo 99 can only be 0,1,4,70,1,4,7 (since the quadratic residues modulo 99 are 02=00^2=0, 12=11^2=1, 22=42^2=4, 32=03^2=0, 42=74^2=7, 52=75^2=7, 62=06^2=0, 72=47^2=4, 82=18^2=1).

But NN has digit sum 4545, so N0(mod9)N \equiv 0 \pmod{9}.

Therefore, NN is divisible by 99.

If NN is a perfect square, then its square root must also be divisible by 33 (since 99 is a square, and NN is divisible by 99).

Let N=k2N = k^2, with kk divisible by 33.

But NN does not end with 55 or 00. The possible last digits for a square are 0,1,4,5,6,90,1,4,5,6,9.

But NN cannot end with 00 or 55 (by the problem statement), so the possible last digits are 1,4,6,91,4,6,9.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Now, consider the divisibility by 99:

If NN is divisible by 99, then kk must be divisible by 33.

Let us check the possible endings for kk so that k2k^2 ends with 1,4,6,91,4,6,9.

Squares ending with 11:
kk ends with 11 or 99.

Squares ending with 44:
kk ends with 22 or 88.

Squares ending with 66:
kk ends with 44 or 66.

Squares ending with 99:
kk ends with 33 or 77.

But since NN is a permutation of 11 through 99, it cannot end with 00 (already excluded), and it cannot end with 55.

Therefore, such a number NN cannot be a square.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.