(a) In how many ways can the number 105 be written as the difference of two perfect squares?

(b) Show that it is not possible to write the number 106 as the difference of two perfect squares.

##
(a) Let $x$ and $y$ be two positive integers such that the difference between their squares is equal to 105, that is, $x^{2}-y^{2}=105$. Factoring, we get $(x-y)(x+y)=105$, and therefore, $x+y$ and $x-y$ must be divisors of 105, with $x+y > x-y$. Note that $1 \cdot 105 = 3 \cdot 35 = 5 \cdot 21 = 7 \cdot 15$ are all the ways to write the number 105 as a product of two positive integers. Thus, we have four cases:

$$
\begin{aligned}
& \left\{\begin{array}{l}
x+y=105 \\
x-y=1
\end{array} \Longleftrightarrow x=53 \text { and } y=52 .\right. \\
& \left\{\begin{array}{l}
x+y=35 \\
x-y=3
\end{array} \Longleftrightarrow x=19 \text { and } y=16\right. \\
& \left\{\begin{array}{l}
x+y=21 \\
x-y=5
\end{array} \Longleftrightarrow x=13 \text { and } y=8\right.
\end{aligned}
$$

Therefore, it is possible to write 105 as the difference of two squares in four ways, namely: $53^{2}-52^{2}, 19^{2}-16^{2}, 13^{2}-8^{2}$, and $11^{2}-4^{2}$.

(b) Observe that for any integers $x$ and $y$, the numbers $x+y$ and $x-y$ are both even or both odd, since the sum of the two numbers is equal to $2x$, which is even, so we cannot have one even and the other odd.

From this, we conclude that the product $(x+y)(x-y)=x^{2}-y^{2}$ is a multiple of 4 (if $x+y$ and $x-y$ are even) or an odd number (if $x+y$ and $x-y$ are odd).

Since 106 is even but not divisible by 4, it cannot be written as the difference of two squares.

Facts that Help: The difference between the squares of two numbers is equal to the product of the sum of these numbers by the difference of the same numbers. Algebraically:

$$
m^{2}-n^{2}=(m+n)(m-n)
$$

Suggestion: Verify that the sequence that remains on the board after the entire process is periodic.

Facts that Help: A number and the sum of its digits leave the same remainder when divided by 9.