%I #17 Dec 26 2018 16:54:23
%S 1,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
%T 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
%U 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
%N Characteristic sequence for sin(2Pi/n) being rational.
%C The sequence is 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, followed by zeros.
%C In the I. Niven reference a formula for the algebraic degree of 2*sin(2*Pi/n) is found in theorem 3.9. This theorem is attributed to D. H. Lehmer, but the sine part in the Lehmer reference is wrong (to wit: n=12 has rational value 2*sin(2*Pi/12)=2*sin(Pi/6)= 1. Hence the degree is 1 = phi(12)/4, as in Niven's book, but not phi(12)/2 = 2 as in Lehmer's paper (the Sines-table there is wrong).
%D I. Niven, Irrational Numbers, The Math. Assoc. of America, second printing, 1963, distributed by John Wiley and Sons.
%H Antti Karttunen, <a href="/A183919/b183919.txt">Table of n, a(n) for n = 1..10000</a>
%H D. H. Lehmer, <a href="http://www.jstor.org/stable/2301023">A Note on Trigonometric Algebraic Numbers</a>, Am. Math. Monthly 40 (3) (1933) 165-6.
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F a(n) = 1 if sin(2*Pi/n) is rational, and a(n) = 0 if it is irrational.
%e The rational values of 2*sin(2*Pi/n) are 0, 0, 2 and 1 for n=1, 2, 4 and 12, respectively. Otherwise irrational values appear.
%o (PARI) A183919(n) = if(n<1, 0, polcoeff( x^1+x^2+x^4+x^12, n)); \\ _Antti Karttunen_, Dec 24 2018, after code in A089011
%Y Cf. sequence for cos(2Pi/n) is A183918.
%K nonn,easy
%O 1
%A _Wolfdieter Lang_, Jan 13 2011