|
|
A033122
|
|
Base-4 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,1.
|
|
1
|
|
|
1, 4, 17, 69, 276, 1105, 4421, 17684, 70737, 282949, 1131796, 4527185, 18108741, 72434964, 289739857, 1158959429, 4635837716, 18543350865, 74173403461, 296693613844, 1186774455377, 4747097821509, 18988391286036, 75953565144145
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 4*a(n-1) +a(n-3) -4*a(n-4).
G.f.: x*(1+x^2)/((1-x)*(1-4*x)*(1+x+x^2)). [Bruno Berselli, Jun 20 2012]
|
|
MATHEMATICA
|
LinearRecurrence[{4, 0, 1, -4}, {1, 4, 17, 69}, 30] (* Vincenzo Librandi, Jun 20 2012 *)
Table[FromDigits[PadRight[{}, n, {1, 0, 1}], 4], {n, 30}] (* Harvey P. Dale, Jul 17 2018 *)
|
|
PROG
|
(Magma) I:=[1, 4, 17, 69]; [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 20 2012
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|