login
A037670
Base 7 digits are, in order, the first n terms of the periodic sequence with initial period 3,2,0.
1
3, 23, 161, 1130, 7912, 55384, 387691, 2713839, 18996873, 132978114, 930846800, 6515927600, 45611493203, 319280452423, 2234963166961, 15644742168730, 109513195181112, 766592366267784, 5366146563874491, 37563025947121439, 262941181629850073, 1840588271408950514, 12884117899862653600
OFFSET
1,1
FORMULA
From Harvey P. Dale, Oct 15 2011: (Start)
a(1)=3, a(2)=23, a(3)=161, a(4)=1130, a(n) = 7*a(n-1)+a(n-3)-7*a(n-4).
G.f.: x*(2*x+3)/(7*x^4-x^3-7*x+1). (End)
a(n) = floor(161*7^n/342). - Christian Krause, Jun 06 2026
E.g.f.: exp(-x/2)*(-95*exp(3*x/2) + 161*exp(15*x/2) - 66*cos(sqrt(3)*x/2) - 26*sqrt(3)*sin(sqrt(3)*x/2))/342. - Stefano Spezia, Jun 06 2026
MATHEMATICA
With[{nn=10}, Table[FromDigits[Take[PadLeft[{}, 3nn, {3, 2, 0}], n], 7], {n, 3nn}]] (* Harvey P. Dale, Oct 15 2011 *)
(* Alternative: *)
LinearRecurrence[{7, 0, 1, -7}, {3, 23, 161, 1130}, 30] (* Harvey P. Dale, Oct 15 2011 *)
CROSSREFS
Cf. A007093.
Sequence in context: A209011 A164536 A037789 * A037796 A331723 A212395
KEYWORD
nonn,base,easy
STATUS
approved