A120325 Period 6: repeat [0, 0, 1, 0, 1, 0].
0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0
Offset: 0
Examples
a(0) = (1/3)*(sin(0) + sin(0))^2 = 0. a(1) = (1/3)*(sin(Pi/6) + sin(7*Pi/6))^2 = (1/3)*(1/2 - 1/2)^2 = 0. a(2) = (1/3)*(sin(Pi/3) + sin(7*Pi/3))^2 = (1/3)*((sqrt(3))/2 + (sqrt(3))/2)^2 = 1. a(3) = (1/3)*(sin(Pi/2) + sin(7*Pi/2))^2 = (1/3)*(1 - 1)^2 = 0. a(4) = (1/3)*(sin(2*Pi/3) + sin(14*Pi/3))^2 = (1/3)*((sqrt(3))/2 + (sqrt(3))/2)^2 = 1. a(5) = (1/3)*(sin(5*Pi/6) + sin(35*Pi/6))^2 = (1/3)*(1/2 - 1/2)^2 = 0.
References
- L. B. W. Jolley, Summation of Series, Dover (1961).
Links
- Antti Karttunen, Table of n, a(n) for n = 0..100000
- R. J. Mathar, Table of Dirichlet L-Series and Prime Zeta Modulo Functions for Small Moduli, arXiv:1008.2547 [math.NT], 2010-2015.
- Index entries for characteristic functions
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,1).
Crossrefs
Programs
-
Magma
[(n+3)^2 mod (2+((n+1) mod 2)) : n in [0..100]]; // Wesley Ivan Hurt, Oct 31 2014
-
Maple
P:=proc(n)local i,j; for i from 0 by 1 to n do j:=1/3*(sin(i*Pi/6)+sin(7*i*Pi/6))^2; print(j); od; end: P(20); seq(abs(numtheory[jacobi](n,6)),n=3..150) ; # R. J. Mathar, Jul 31 2010
-
Mathematica
Table[Mod[(n + 3)^2, (5 + (-1)^n)/2], {n, 0, 100}] (* Wesley Ivan Hurt, Oct 31 2014 *) PadRight[{},120,{0,0,1,0,1,0}] (* Harvey P. Dale, Oct 05 2016 *)
-
PARI
A120325(n) = ((n%3)&&!(n%2)); \\ Antti Karttunen, Dec 03 2022
-
Python
def A120325(n): return int(not (n+3) % 6 & 3 ^ 1) # Chai Wah Wu, May 25 2022
Formula
a(n) = (1/3)*(sin(n*Pi/6) + sin(7*n*Pi/6))^2.
From R. J. Mathar, Nov 22 2008: (Start)
G.f.: x^2*(1+x^2)/((1+x)*(1-x)*(1+x+x^2)*(1-x+x^2)).
a(n+6) = a(n). (End)
a(n) = ((n+3)*Fibonacci(n+3)) mod 2. - Gary Detlefs, Dec 13 2010
a(n) = 0 if n mod 6 = 0, otherwise a(n) = n mod 2 + (-1)^n. - Gary Detlefs, Dec 13 2010
a(n) = (n+3)^2 mod (5+(-1)^n)/2. - Wesley Ivan Hurt, Oct 31 2014
a(n) = sin(n*Pi/3)^2*(2-4*cos(n*Pi/3))/3. - Wesley Ivan Hurt, Jun 19 2016
E.g.f.: 2*(cosh(x) - cos(sqrt(3)*x/2)*cosh(x/2))/3. - Ilya Gutkovskiy, Jun 20 2016
a(n) = sign((n-3) mod 2) * sign((n-3) mod 3). - Wesley Ivan Hurt, Feb 04 2022
From Antti Karttunen, Dec 03 2022: (Start)
a(n) = 1 - A093719(n).
a(n) = [A276086(n) == 3 (mod 6)], where [ ] is the Iverson bracket.
(End)
Extensions
Data section extended up to a(120) by Antti Karttunen, Dec 03 2022
Comments