4.1. Petya wrote a natural number $A$ on the board. If it is multiplied by 8, the result is the square of a natural number. How many three-digit numbers $B$ exist such that $A \cdot B$ is also a square of a natural number?
# Answer: 15

Solution. If $8 A$ is the square of a natural number, then any prime number greater than 2 must appear in $A$ with an even exponent, and the number 2 must appear with an odd exponent. Therefore, in $B$, any prime number greater than 2 must also appear with an even exponent, and the number 2 must appear with an odd exponent, meaning $B$ must be of the form $2 x^{2}$. Consequently, we need to find the number of such $x$ for which $2 x^{2}$ is a three-digit number. In other words, $1000 > 2 x^{2} \geqslant 100, 500 > x^{2} \geqslant 50$. Suitable values for $x$ range from 8 to 22, and there are $22-7=15$ such values.