|
|
A037513
|
|
Base-4 digits are, in order, the first n terms of the periodic sequence with initial period 2,0,1.
|
|
1
|
|
|
2, 8, 33, 134, 536, 2145, 8582, 34328, 137313, 549254, 2197016, 8788065, 35152262, 140609048, 562436193, 2249744774, 8998979096, 35995916385, 143983665542, 575934662168, 2303738648673, 9214954594694, 36859818378776
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(2+x^2) / ( (x-1)*(4*x-1)*(1 + x + x^2) ). - R. J. Mathar, Nov 21 2011
|
|
MATHEMATICA
|
LinearRecurrence[{4, 0, 1, -4}, {2, 8, 33, 134}, 40] (* Vincenzo Librandi, Jun 22 2012 *)
Module[{nn=30, c}, c=PadRight[{}, nn, {2, 0, 1}]; Table[FromDigits[Take[c, n], 4], {n, nn}]] (* Harvey P. Dale, May 28 2014 *)
|
|
PROG
|
(Magma) I:=[2, 8, 33, 134]; [n le 4 select I[n] else 4*Self(n-1)+Self(n-3)-4*Self(n-4): n in [1..30]]; // Vincenzo Librandi, Jun 22 2012
(PARI) x='x+O('x^99); Vec(x*(2+x^2)/((x-1)*(4*x-1)*(1+x+x^2))) \\ Altug Alkan, Sep 21 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|