login
A037517
Base 8 digits are, in order, the first n terms of the periodic sequence with initial period 2,0,1.
1
2, 16, 129, 1034, 8272, 66177, 529418, 4235344, 33882753, 271062026, 2168496208, 17347969665, 138783757322, 1110270058576, 8882160468609, 71057283748874, 568458269990992, 4547666159927937, 36381329279423498, 291050634235387984, 2328405073883103873, 18627240591064830986, 149017924728518647888
OFFSET
1,1
FORMULA
G.f.: x*(2+x^2) / ( (x-1)*(8*x-1)*(1+x+x^2) ). - R. J. Mathar, Nov 21 2011
a(1)=2, a(2)=16, a(3)=129, a(4)=1034, a(n)=8*a(n-1)+a(n-3)-8*a(n-4). - Harvey P. Dale, May 09 2015
a(n) = floor(129*8^n/511). - Christian Krause, Jun 05 2026
MATHEMATICA
Module[{nn=20, d8}, d8=PadRight[{}, nn, {2, 0, 1}]; Table[FromDigits[Take[ d8, n], 8], {n, nn}]] (* or *) LinearRecurrence[{8, 0, 1, -8}, {2, 16, 129, 1034}, 20] (* Harvey P. Dale, May 09 2015 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -8, 1, 0, 8]^(n-1)*[2; 16; 129; 1034])[1, 1] \\ Charles R Greathouse IV, Jun 02 2026
CROSSREFS
Sequence in context: A171451 A012459 A012463 * A037720 A022018 A067684
KEYWORD
nonn,base,easy,changed
EXTENSIONS
a(19)-a(23) from Christian Krause, Jun 5 2026
STATUS
approved