## Task 23/89

A sequence is given by the formation rule

$$
a_{k}=p \cdot k \cdot(k+1)+1
$$

where $p$ is a prime number and $k>0$. The 7th term is the square of a prime number $P$. Determine all possible pairs $(p ; P)$.

---
From $a_{7}=p \cdot 7 \cdot 8+1=P^{2}$ it follows that $P^{2}-1=56 p$. Certainly, $P>3$. Then $P \equiv \pm 1(\bmod 3)$ and $P^{2} \equiv 1$ $(\bmod 3)$, so $P^{2}-1 \equiv 0(\bmod 3)$.

Since $56 \neq 550(\bmod 3)$, it follows that $p \equiv 0(\bmod 3)$ and thus (due to the prime property of $p) p=$ $3, P^{2}=3 \cdot 56+1=169, P=13$. Therefore, $(p ; P)=(3 ; 13)$ is the only possible pair.