login
A037529
Base-4 digits are, in order, the first n terms of the periodic sequence with initial period 1,1,2.
0
1, 5, 22, 89, 357, 1430, 5721, 22885, 91542, 366169, 1464677, 5858710, 23434841, 93739365, 374957462, 1499829849, 5999319397, 23997277590, 95989110361, 383956441445, 1535825765782, 6143303063129, 24573212252517, 98292849010070
OFFSET
1,2
FORMULA
G.f.: x*(1+x+2*x^2) / ( (x-1)*(4*x-1)*(1+x+x^2) ). - R. J. Mathar, Apr 27 2015
A007090(a(n)) = A037535(n).
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {1, 1, 2}], 4], {n, 30}] (* or *) LinearRecurrence[ {4, 0, 1, -4}, {1, 5, 22, 89}, 30] (* Harvey P. Dale, Mar 19 2016 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -4, 1, 0, 4]^(n-1)*[1; 5; 22; 89])[1, 1] \\ Charles R Greathouse IV, Feb 13 2017
CROSSREFS
Sequence in context: A006148 A262293 A086090 * A108072 A081892 A128566
KEYWORD
nonn,base,easy
STATUS
approved