login
A037789
Base 7 digits are, in order, the first n terms of the periodic sequence with initial period 3,2,0,1.
1
3, 23, 161, 1128, 7899, 55295, 387065, 2709456, 18966195, 132763367, 929343569, 6505404984, 45537834891, 318764844239, 2231353909673, 15619477367712, 109336341573987, 765354391017911, 5357480737125377
OFFSET
1,1
FORMULA
a(n) = 8a(n-1) - 8a(n-2) + 8a(n-3) - 7a(n-4).
G.f.: x*(3-x+x^2) / ( (x-1)*(7*x-1)*(x^2+1) ). - R. J. Mathar, May 01 2015
MATHEMATICA
nn=20; With[{c=PadRight[{}, nn, {3, 2, 0, 1}]}, Table[FromDigits[Take[c, n], 7], {n, nn}]] (* or *) LinearRecurrence[{8, -8, 8, -7}, {3, 23, 161, 1128}, 20] (* Harvey P. Dale, Apr 29 2012 *)
CROSSREFS
Sequence in context: A308677 A209011 A164536 * A037670 A037796 A331723
KEYWORD
nonn,base,easy
STATUS
approved