login
A120324
Periodic sequence 0, 1, 0, 4, 0, 1.
0
0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0, 1, 0, 4, 0, 1, 0
OFFSET
0,4
FORMULA
a(n) = (sin(n*Pi/6)+sin(5*n*Pi/6))^2.
From Andrew Howroyd, Jul 31 2018: (Start)
a(n) = a(n-6) for n > 5.
G.f.: x*(1 + 4*x^2 + x^4)/((1 - x)*(1 + x)*(1 - x + x^2)*(1 + x + x^2)). (End)
From Amiram Eldar, Jan 03 2023: (Start)
Multiplicative with a(2^e) = 0, a(3^e) = 4, and a(p^e) = 1 for p >= 5.
Dirichlet g.f.: zeta(s)*(2^s-1)*(3^s+3)/6^s. (End)
EXAMPLE
a(0)=(sin(0)+sin(0))^2 = 0.
a(1)=(sin(Pi/6)+sin(5*Pi/6))^2 = (1/2+1/2)^2 = 1.
a(2)=(sin(Pi/3)+sin(5*Pi/3))^2 = ((3^.5)/2-(3^.5)/2)^2 = 0.
a(3)=(sin(Pi/2)+sin(5*Pi/2))^2 = (1+1)^2 = 4.
a(4)=(sin(2*Pi/3)+sin(10*Pi/3))^2 = ((3^.5)/2-(3^.5)/2)^2 = 0.
a(5)=(sin(5*Pi/6)+sin(25*Pi/6))^2 = (1/2+1/2)^2 = 1.
MAPLE
P:=proc(n) local i, j; for i from 0 by 1 to n do j:=(sin(i*Pi/6)+sin(5*i*Pi/6))^2; print(j); od; end: P(20);
MATHEMATICA
PadRight[{}, 110, {0, 1, 0, 4, 0, 1}] (* Harvey P. Dale, Mar 13 2013 *)
PROG
(PARI) a(n)=if(n%2==0, 0, if(n%3, 1, 4)); \\ Andrew Howroyd, Jul 31 2018
CROSSREFS
Sequence in context: A199571 A036859 A036861 * A136630 A275714 A111728
KEYWORD
easy,nonn,mult
AUTHOR
EXTENSIONS
a(66)-a(90) and keyword:mult added by Andrew Howroyd, Jul 31 2018
STATUS
approved