The numbers a1 and a2 are integers. Since a1=cosx1, a2=cos(2x)1 and cos(2x)=2(cosx)2−1, we have a2=2cos2x−11=2−a12a12. Now, a2 is an integer, so 2−a12 is a divisor of a12. So, 2−a12 divides 2−a12 and a12. It therefore also divides their sum, which is equal to 2. We conclude that 2−a12 is one of the numbers −2,−1,1 or 2.
In the first case we have a12=4, in the second case we have a12=3, in the third case we get a12=1 and in the fourth case we get a12=0. Since a1 is a non-zero integer, we can only have a1=−2, a1=2, a1=−1 or a1=1. From here it follows that x can only be equal to 0,3π,32π,π,34π or 35π.
If x=0, then an=1 for all n. If x=π, we get the sequence −1,1,−1,1,…. In the remaining four cases we have an+6=an, since for all integers a we have
cos(3(n+6)⋅aπ)=cos(3n⋅aπ+2aπ)=cos(3n⋅aπ).
It therefore suffices to check that the first six terms of the sequence are integers. When x=3π and 35π we have a1=2, a2=−2, a3=−1, a4=−2, a5=2, a6=1. If x=32π or x=34π, then the first six terms are −2,−2,1,−2,−2,1.
The solutions are 0,3π,32π,π,34π and 35π.