|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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 .
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
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|