login
A037572
Base 7 digits are, in order, the first n terms of the periodic sequence with initial period 2,1,2.
0
2, 15, 107, 751, 5258, 36808, 257658, 1803607, 12625251, 88376759, 618637314, 4330461200, 30313228402, 212192598815, 1485348191707, 10397437341951, 72782061393658, 509474429755608, 3566321008289258
OFFSET
1,1
FORMULA
G.f.: x*(2+x+2*x^2) / ( (x-1)*(7*x-1)*(1+x+x^2) ). - R. J. Mathar, Apr 27 2015
A007093(a(n)) = A037575(n).
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {2, 1, 2}], 7], {n, 20}] (* Harvey P. Dale, Dec 20 2024 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -7, 1, 0, 7]^(n-1)*[2; 15; 107; 751])[1, 1] \\ Charles R Greathouse IV, Feb 13 2017
CROSSREFS
Sequence in context: A308938 A037556 A037492 * A218686 A279087 A037740
KEYWORD
nonn,base,easy
STATUS
approved