|
|
A037569
|
|
Base 4 digits are, in order, the first n terms of the periodic sequence with initial period 2,1,2.
|
|
1
|
|
|
2, 9, 38, 154, 617, 2470, 9882, 39529, 158118, 632474, 2529897, 10119590, 40478362, 161913449, 647653798, 2590615194, 10362460777, 41449843110, 165799372442, 663197489769, 2652789959078, 10611159836314, 42444639345257
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(2+x+2*x^2) / ((x-1)*(4*x-1)*(1+x+x^2)). - R. J. Mathar, Nov 21 2011
|
|
MATHEMATICA
|
With[{c=PadRight[{}, 30, {2, 1, 2}]}, Table[FromDigits[Take[c, n], 4], {n, 30}]] (* Harvey P. Dale, Nov 06 2011 *)
LinearRecurrence[{4, 0, 1, -4}, {2, 9, 38, 154}, 40] (* Vincenzo Librandi, Jun 17 2012 *)
|
|
PROG
|
(Magma) I:=[2, 9, 38, 154]; [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 17 2012
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|