Recursionmedium
0:00.0

The recurrence an=an2a_n = -a_{n-2} with a0=1,a1=0a_0 = 1, a_1 = 0 has characteristic roots r=±ir = \pm i (purely imaginary). These can be written as r=e±iπ/2r = e^{\pm i\pi/2}. What is the period of the sequence (smallest positive pp such that an+p=ana_{n+p} = a_n for all nn)?