## Task A-3.3.

Determine all natural numbers that are squares of natural numbers and in whose decimal representation two digits are different from 0, and one of these two is 3.
## Solution.

Let $n$ be a natural number such that $n^2$ has the given properties.

The number $n^2$ is divisible by 10 if and only if $n$ is divisible by 10, so $n^2 = m^2 \cdot 100^k$, for some $m \in \mathbb{N}, k \in \mathbb{N}_0$, where $10 \nmid m$.

From the given conditions, it follows that $m^2 = \overline{a 00 \ldots 00 b} = a \cdot 10^l + b$, where $a, b \neq 0, l \in \mathbb{N}$, and $a=3$ or $b=3$.

The last digit of the number $m^2$, i.e., $b$, must be in the set $\{1,4,5,6,9\}$.

Thus, $a=3$, so we have

$$
m^2 = 3 \cdot 10^l + b, \quad b \in \{1,4,5,6,9\}
$$

A number is divisible by 4 if and only if its last two digits form a number divisible by 4.

We conclude that if $b=6$, then $l=0$, i.e., $m^2 = 36$ and $n^2 = 36 \cdot 100^k = (6 \cdot 10^k)^2$.

By examining the remainders that $m$ gives when divided by 9, we see that $m^2$ can give remainders $0,1,4$, and 7. Since $m^2 \equiv 3 + b \pmod{9}$, we see that $b$ cannot be 5 or 9.

We are left to consider the cases when $b=1$ and $b=4$. Then we have

$$
3 \cdot 2^l \cdot 5^l = 3 \cdot 10^l = m^2 - c^2 = (m-c)(m+c)
$$

for $c=1$ or $c=2$.

The greatest common divisor $M$ of the factors $m-c$ and $m+c$ divides their difference $2c$, so $M \in \{1,2,4\}$. Therefore, exactly one of the numbers $m-c$ and $m+c$ can be divisible by 5.

It must be $l \geqslant 2$ since 31 and 34 are not squares of natural numbers, so since $m+c > m-c$, we see that $m+c$ must be divisible by $5^l$.

We have

$$
2c = (m+c) - (m-c) \geqslant 5^l - 3 \cdot 2^l
$$

1 point

Since $5^l - 3 \cdot 2^l > 4$ for every $l \geqslant 2$, we see that this is impossible. Therefore, it cannot be $b=1$ or $b=4$.

We conclude that all the required squares of natural numbers are of the form $36 \cdot 100^k$, for $k \in \mathbb{N}_0$.