login
A037505
Base-4 digits are, in order, the first n terms of the periodic sequence with initial period 1,2,0.
0
1, 6, 24, 97, 390, 1560, 6241, 24966, 99864, 399457, 1597830, 6391320, 25565281, 102261126, 409044504, 1636178017, 6544712070, 26178848280, 104715393121, 418861572486, 1675446289944, 6701785159777, 26807140639110, 107228562556440
OFFSET
1,2
FORMULA
G.f.: x*(1+2*x) / ( (x-1)*(4*x-1)*(1+x+x^2) ). - R. J. Mathar, Apr 27 2015
A007090(a(n)) = A037511(n). - R. J. Mathar, Apr 27 2015
MATHEMATICA
Module[{nn=30, c}, c=PadRight[{}, nn, {1, 2, 0}]; Table[FromDigits[Take[c, n], 4], {n, nn}]] (* Harvey P. Dale, Mar 06 2013 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -4, 1, 0, 4]^(n-1)*[1; 6; 24; 97])[1, 1] \\ Charles R Greathouse IV, Feb 13 2017
CROSSREFS
Sequence in context: A002023 A164908 A290911 * A048179 A117614 A037688
KEYWORD
nonn,base,easy
STATUS
approved