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”).

A159956
Period 16 : 0,1,2,3,1,2,3,0,2,3,0,1,3,0,1,2 .
1
0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 0, 2
OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, -1, 1, 0, 0, -1, 1, 0, 0, -1, 1).
FORMULA
a(n+16) = a(n) with a(0)=a(7)=a(10)=a(13)=0, a(1)=a(4)=a(11)=a(14)=1, a(2)=a(5)=a(8)=a(15)=2, a(3)=a(6)=a(9)=a(12)=3 .
From Colin Barker, Dec 20 2017: (Start)
G.f.: x*(1 + x + x^2 - 2*x^3 + 2*x^4 + 2*x^5 - 2*x^6 + 3*x^8 - x^9 - x^10 + 2*x^11) / ((1 - x)*(1 + x^4)*(1 + x^8)).
a(n) = a(n-1) - a(n-4) + a(n-5) - a(n-8) + a(n-9) - a(n-12) + a(n-13) for n>12.
(End)
MATHEMATICA
PadRight[{}, 120, {0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2}] (* or *) LinearRecurrence[ {1, 0, 0, -1, 1, 0, 0, -1, 1, 0, 0, -1, 1}, {0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 3}, 120] (* Harvey P. Dale, Aug 23 2015 *)
PROG
(PARI) concat(0, Vec(x*(1 + x + x^2 - 2*x^3 + 2*x^4 + 2*x^5 - 2*x^6 + 3*x^8 - x^9 - x^10 + 2*x^11) / ((1 - x)*(1 + x^4)*(1 + x^8)) + O(x^100))) \\ Colin Barker, Dec 20 2017
CROSSREFS
Sequence in context: A254761 A227552 A205003 * A053839 A047896 A073645
KEYWORD
easy,nonn
AUTHOR
Philippe Deléham, Apr 27 2009
STATUS
approved