← RoseCode

ROSECODE 224

A long period

gerrob · Math ·

Define the following sequence: a(0)=sin(2*Pi/n)^2 and for k>0: a(k)=4*a(k-1)*(1-a(k-1)). For odd n value this sequence is periodical!

Find the period for n=314159265358979323846264338327950288419716939937510582097.