Find all positive integers $n$ that have 4 digits, all of them perfect squares, and such that $n$ is divisible by 2, 3, 5 and 7.
Problem
Source: Centroamerican Olympiad 2016, problem 1
Tags: number theory, Digits
20.06.2016 00:39
Note that the digits we are allowed to use are $0,1,4,9$ so clearly the last digit must be $0$ in order to satisfy that this number is divisible by $5$ and $2$. There aren't too many numbers to list out that are divisible by $3$ from here (use the divisibility rule that the sum of the digits must be a multiple of $3$). We get that the numbers divisible by $3$ are $1110,1140,1410,4410,4140,9000,9090,9900,9990$. Checking each of these numbers to see if they are divisible by $7$ gives us that the only positive integer $n$ that satisfy the conditions is $\boxed{4410}$.
22.06.2016 05:30
(Same solution written more rigorously) Let the number be $N$ The only posible digits of $N$ are $0, 1, 4, 9$ 1) Since $2\mid N$ and $5\mid N \Rightarrow 10\mid N \longrightarrow$ Then the last digit of $N$ is $0$ 2) $0 \equiv 9 \pmod 3$ and $1\equiv 4 \pmod 3$ So if $3|N$ then the other three digits of $N$ must belong to $\{1,4\}$ or to $\{0,9\}$ 3) Since $gcd(7,10)=1 \rightarrow$ if $7\mid N \Rightarrow 7\mid \frac{N}{10}$ then if $N=\overline{abc0} \Rightarrow 7\mid \overline{abc}$ 4) Now it's easy to check the cases and we conclude that the only solution is $N=4410$ $Q.E.D$
21.05.2022 19:19
It's clear that only possible digits for $N=\overline{abcd}$ are ${0,1,4,9}$. For the number to be divisible by 2 and 5, it has to be divisible by 10, therefore $N=\overline{abc0}$. Since $0 \equiv 9 \pmod 3$, and $1 \equiv 4 \pmod 3$, We can only pair 9's with 0's and 1's with 4's. Only solutions now are: {1110, 1140, 1410, 1440, 4110, 4140, 4410, 4440, 9000, 9090, 9900, 9990} Since: $9 \equiv 2 \pmod 7$, $90 \equiv 6 \pmod 7$, and $900 \equiv 4 \pmod 7$, no combination with 0's and 9's is divisible by 7. Checking 1's and 4's: $1\equiv 1 \pmod 7$, $10 \equiv 3 \pmod 7$, and $100 \equiv 2 \pmod 7$ $4\equiv 4 \pmod 7$, $40 \equiv 5 \pmod 7$, and $400 \equiv 1 \pmod 7$ So we must pick a 3 numbers from the pairs ({2,1}, {3,5}, {1,4}) and the sum of those numbers must add 7, because the greatest sum possible is 11. Only case possible: 1+5+1 which corresponds to the number 4410