## Task A-3.2.

A quadruple of natural numbers $(a, b, c, d)$ is called green if

$$
b=a^{2}+1, \quad c=b^{2}+1, \quad d=c^{2}+1
$$

and $D(a)+D(b)+D(c)+D(d)$ is odd, where $D(k)$ is the number of positive divisors of the natural number $k$.

How many green quadruples are there whose all members are less than 1000000?
## Solution.

A natural number has an odd number of divisors if and only if it is the square of some natural number. For a natural number $m$, we have

$$
m^{2}d=c^{2}+1>c^{2}=\left(b^{2}+1\right)^{2}>b^{4}=\left(a^{2}+1\right)^{4}>a^{8}
$$

Therefore, it must be that $a^{8}<10^{6}$. Since $10^{6}=1000^{3}<1024^{3}=2^{20}<2^{24}=8^{8}$, we conclude that $a<8$. The only squares less than 8 are 1 and 4.

By direct verification, we conclude that both quadruples $(1,2,5,26)$ and $(4,17,290,84101)$ are green. Thus, there are two such green quadruples.

Note: The claim that a number is a square of a natural number if and only if it has an odd number of divisors does not need to be proven by the student. A simple proof of this claim follows. All divisors of a number $n$ can be grouped into pairs where the divisor $d$ is paired with $\frac{n}{d}$, except when $n=k^{2}$ for some natural number $k$ (in which case $k$ is paired with itself).