Problem

Source: Iran 2nd round 2022 P5

Tags: number theory, Sequence



define $(a_n)_{n \in \mathbb{N}}$ such that $a_1=2$ and $$a_{n+1}=\left(1+\frac{1}{n}\right)^n \times a_{n}$$Prove that there exists infinite number of $n$ such that $\frac{a_1a_2 \ldots a_n}{n+1}$ is a square of an integer.