|
|
A037545
|
|
Base-4 digits are, in order, the first n terms of the periodic sequence with initial period 1,2,2.
|
|
0
|
|
|
1, 6, 26, 105, 422, 1690, 6761, 27046, 108186, 432745, 1730982, 6923930, 27695721, 110782886, 443131546, 1772526185, 7090104742, 28360418970, 113441675881, 453766703526, 1815066814106, 7260267256425, 29041069025702
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(1+2*x+2*x^2) / ( (x-1)*(4*x-1)*(1+x+x^2) ). - R. J. Mathar, Apr 30 2015
a(1)=1, a(2)=6, a(3)=26, a(4)=105, a(n)=4*a(n-1)+a(n-3)-4*a(n-4). - Harvey P. Dale, May 22 2015
|
|
MATHEMATICA
|
Module[{nn=30, c}, c=PadRight[{}, nn, {1, 2, 2}]; Table[FromDigits[Take[c, n], 4], {n, nn}]] (* or *) LinearRecurrence[{4, 0, 1, -4}, {1, 6, 26, 105}, 30] (* Harvey P. Dale, May 22 2015 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|