login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A144110
Period 6: repeat [2, 2, 2, 1, 1, 1].
1
2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1
OFFSET
0,1
COMMENTS
a(n) = 2 for n = 0,1,2 modulo 6; a(n) = 1 for n = 3,4,5 modulo 6.
FORMULA
G.f.: (1+2*x^3)/((1-x)*(1+x)*(1-x+x^2)); a(n) = 3/2-(-1)^n/6-A057079(n)/3. [R. J. Mathar, Sep 17 2008]
a(n) = a(n-1) - a(n-3) + a(n-4) for n>3; a(n) = 1 + mod(floor((-n-1)/3), 2); a(n) = A088911(n) + 1. - Wesley Ivan Hurt, Sep 04 2014
a(n) = (9 + cos(n*Pi) + 2*cos(n*Pi/3) + 2*sqrt(3)*sin(n*Pi/3))/6. - Wesley Ivan Hurt, Jun 23 2016
MAPLE
A144110:=n->1+(floor((-n-1)/3) mod 2): seq(A144110(n), n=0..100); # Wesley Ivan Hurt, Sep 04 2014
MATHEMATICA
Table[1 + Mod[Floor[(-n - 1)/3], 2], {n, 0, 100}] (* Wesley Ivan Hurt, Sep 04 2014 *)
PROG
(Magma) [1+(Floor((-n-1)/3) mod 2) : n in [0..100]]; // Wesley Ivan Hurt, Sep 04 2014
(PARI) a(n)=[2, 2, 2, 1, 1, 1][n%6+1] \\ Edward Jiang, Sep 04 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Philippe Deléham, Sep 11 2008, Sep 15 2008
STATUS
approved