login
A137934
Period 6: 2,2,2,2,2,0.
0
2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0
OFFSET
1,1
FORMULA
a(n) = lcm(gcd(n mod 2, n mod 3), 2).
From R. J. Mathar, Mar 06 2008: (Start)
O.g.f.: -2*x*(1+x+x^2+x^3+x^4)/((x-1)(x+1)(x^2+x+1)(x^2-x+1)).
a(n) = 2*A097325(n). (End)
PROG
(PARI) a(n)=if(n%6, 2, 0) \\ Charles R Greathouse IV, Jul 13 2016
CROSSREFS
Sequence in context: A173069 A363934 A059963 * A133738 A240713 A111409
KEYWORD
nonn,easy
AUTHOR
William A. Tedeschi, Feb 29 2008
STATUS
approved