Skip to main content
OlympiadHQ

Browse · MathNet

Print

Estonian Mathematical Olympiad

Estonia number theory

Problem

a. Does there exist a positive integer such that the eight last digits of the number are the same as in the number , but the ninth digit from the end of these two numbers are different?

b. Does there exist a positive integer such that the nine last digits of the number are the same as in the number , but the tenth digit from the end of these two numbers are different?
Solution
The condition that the last digits of two numbers are the same is fulfilled if and only if the difference of these two numbers ends with exactly zeroes. Note that .

a. Let , then the number ends with 4 zeroes and the fifth digit from the end is 1. Hence the number ends with 8 zeroes and the ninth digit from the end is 1. Hence this fits.

b. If a number ends with exactly zeroes, then the square of this number ends with exactly zeroes. Hence cannot end with exactly 9 zeroes, since 9 is odd, and so there are no such integers that would fulfill the condition.
Final answer
a) Yes; for example n = 100010001. b) No; such an integer does not exist.

Techniques

Modular ArithmeticDivisibility / Factorization