## Task A-2.3.

How many natural numbers less than 1000000 are squares of natural numbers and give a remainder of 4 when divided by 8?
## First solution.

Determine which natural numbers $n$ satisfy the given property, that their square is of the form $8k + 4$.

If a number is odd, then its square is also odd. Therefore, $n$ must be even.

1 point

If a number is divisible by 4, its square is divisible by 16, and thus also by 8.

1 point

This means that $n$ must be of the form $4l + 2$.

1 point

Let's check that all such numbers satisfy the given property: If $n = 4l + 2$, then $n^2 = 16l^2 + 16l + 4$, which is of the form $8k + 4$.

1 point

Notice that the square of a natural number is less than 1000000 if and only if that natural number is less than 1000. Therefore, we need to determine how many natural numbers less than 1000 are of the form $4k + 2$.

Finally, these are all the numbers $2, 6, 10, \ldots, 998$, i.e., of the form $4k + 2$ for $k = 0, 1, 2, \ldots, 249$. 1 point

There are 250 such numbers.

1 point