# An alternative way to test primality of Fermat numbers?

How to prove following statement :

Let's define an infinite sequence of positive integers :

$a_i=\cos(4^{i} \cdot \arccos(4)) ; i=1,2,3......$

then for $n \geq 2 , F_n$ is prime if and only if :

$a_{2^{n-1}-1} \equiv 0 \pmod {F_n}$

For example :

$a_1 \equiv 0 \pmod {F_2}$

$a_3 \equiv 0 \pmod {F_3}$

$a_7 \equiv 0 \pmod {F_4}$

-
cosine has range [-1, 1]. So, $a_i$ is between -1 and 1 always. Why are you looking at $a_i$ mod $F_n$? If it's congruent to 0, it IS 0. –  Graphth Dec 18 '11 at 14:46
@Graphth,try to compute $\cos(4^1 \cdot \arccos(4))$ for example... –  pedja Dec 18 '11 at 14:52