Consider the sequence $a_{1}, a_{2}, a_{3}, \ldots$ defined by $a_{1}=9$ and

$$
a_{n+1}=\frac{(n+5) a_{n}+22}{n+3}
$$

for $n \geqslant 1$.

Find all natural numbers $n$ for which $a_{n}$ is a perfect square of an integer.
Define $b_{n}=a_{n}+11$. Then

$$
22=(n+3) a_{n+1}-(n+5) a_{n}=(n+3) b_{n+1}-11 n-33-(n+5) b_{n}+11 n+55
$$

giving $(n+3) b_{n+1}=(n+5) b_{n}$. Then

$b_{n+1}=\frac{n+5}{n+3} b_{n}=\frac{(n+5)(n+4)}{(n+3)(n+2)} b_{n-1}=\frac{(n+5)(n+4)}{(n+2)(n+1)} b_{n-2}=\cdots=\frac{(n+5)(n+4)}{5 \cdot 4} b_{1}=(n+5)(n+4)$.

Therefore $b_{n}=(n+4)(n+3)=n^{2}+7 n+12$ and $a_{n}=n^{2}+7 n+1$.

Since $(n+1)^{2}=n^{2}+2 n+1<a_{n}<n^{2}+8 n+16=(n+4)^{2}$, if $a_{n}$ is a perfect square, then $a_{n}=(n+2)^{2}$ or $a_{n}=(n+3)^{2}$.

If $a_{n}=(n+2)^{2}$, then $n^{2}+4 n+4=n^{2}+7 n+1$ giving $n=1$. If $a_{n}=(n+3)^{2}$, then $n^{2}+6 n+9=$ $n^{2}+7 n+1$ giving $n=8$.

Comment. We provide some other methods to find $a_{n}$.

Method 1: Define $b_{n}=\frac{a_{n}+11}{n+3}$. Then $b_{1}=5$ and $a_{n}=(n+3) b_{n}-11$. So

$$
a_{n+1}=(n+4) b_{n+1}-11=\frac{(n+5) a_{n}+22}{n+3}=a_{n}+\frac{2\left(a_{n}+11\right)}{n+3}=(n+3) b_{n}-11+2 b_{n}
$$

giving $(n+4) b_{n+1}=(n+5) b_{n}$. Then

$$
b_{n+1}=\frac{n+5}{n+4} b_{n}=\frac{n+5}{n+3} b_{n-1}=\cdots=\frac{n+5}{5} b_{1}=n+5
$$

Then $b_{n}=n+4$, so $a_{n}=(n+3)(n+4)-11=n^{2}+7 n+1$.

Method 2: We have

$$
(n+3) a_{n+1}-(n+5) a_{n}=22
$$

and therefore

$$
\frac{a_{n+1}}{(n+5)(n+4)}-\frac{a_{n}}{(n+4)(n+3)}=\frac{22}{(n+3)(n+4)(n+5)}=11\left[\frac{1}{n+3}-\frac{2}{n+4}+\frac{1}{n+5}\right]
$$

Now define $b_{n}=\frac{a_{n}}{(n+4)(n+3)}$ to get

$$
b_{n+1}=b_{n}+11\left[\frac{1}{n+3}-\frac{2}{n+4}+\frac{1}{n+5}\right]
$$

which telescopically gives

$$
\begin{aligned}
b_{n+1} & =b_{1}+11\left[\left(\frac{1}{4}-\frac{2}{5}+\frac{1}{6}\right)+\left(\frac{1}{5}-\frac{2}{6}+\frac{1}{7}\right)+\cdots+\left(\frac{1}{n+3}-\frac{2}{n+4}+\frac{1}{n+5}\right)\right] \\
& =b_{1}+11\left(\frac{1}{4}-\frac{1}{5}-\frac{1}{n+4}+\frac{1}{n+5}\right)=\frac{9}{20}+\frac{11}{20}-\frac{11}{(n+4)(n+5)}
\end{aligned}
$$

We get $b_{n+1}=(n+4)(n+5)-11$ from which it follows that $b_{n}=(n+3)(n+4)-11=n^{2}+7 n+1$.