# Find when the product would be an integer

The problem: The sequence $\{a_n\}$ is defined recursively by $a_0=1,a_1=\sqrt{2}$ and $a_n=a_{n-1}a_{n-2}^2$ for $n \geq 2$. What is the smallest positive integer $k$ such that the product $a_1 a_2 \cdots a_k$ is an integer?

A.$\, 17\quad \quad$ B.$\, 18\quad \quad$ C.$\, 19\quad \quad$ D.$\, 20\quad \quad$

My approach: Notice that $a_{n-1} a_{n-2}={a_n \over a_{n-2}}$. So, $a_1 a_2 \cdots a_k$ is equal to ${a_{k+1} \over a_1}$ when $k$ is even and ${a_k^2 \over a_1}$ when $k$ is odd. But, I'm stuck here. Any ideas on how to progress further? (The answer is $17$, if that helps.)

## 1 Answer

Hint notice the powers of $2$ the power in $a_2$ is $a_2=a_1.2-1$ in $a_3=a_2.2+1$ then in $a_4=a_3.2-1$ and then this goes on like $a_n=a_{n-1}.2\pm 1$ where $n$ decides whether it's plus or minus depending on odd or even number which I have explained above. So now this sum of powers should be divisible by $19$ to get an integer so some of first powers are $1,1,3,5,11,21..$ hope you can do it then. I think rather than going rigorously we can use this way and do calculations easily as powers are small.

• No. They are not quite small when we go to $17$ and such. Anyways, thank you for noticing the pattern. This solved the problem. – SinTan1729 May 4 '16 at 12:39
• You are welcome by small I mean not getting complicated. ;) simple integers – Archis Welankar May 4 '16 at 12:40
• Sure enough. No offence. :) – SinTan1729 May 4 '16 at 12:44
• No problem. :).. – Archis Welankar May 4 '16 at 12:46