%I #25 Mar 20 2023 13:37:33
%S 1,9,66,462,3235,22647,158532,1109724,7768069,54376485,380635398,
%T 2664447786,18651134503,130557941523,913905590664,6397339134648,
%U 44781373942537,313469617597761,2194287323184330
%N Base 7 digits are, in order, the first n terms of the periodic sequence with initial period 1,2,3,0.
%H Vincenzo Librandi, <a href="/A037698/b037698.txt">Table of n, a(n) for n = 1..200</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (7,0,0,1,-7).
%F a(n) = 7*a(n-1) + a(n-4) - 7*a(n-5).
%F G.f.: x*(1+2*x+3*x^2) / ( (x-1)*(7*x-1)*(1+x)*(x^2+1) ). - _R. J. Mathar_, Dec 19 2011
%F a(n) = (11*7^(n+1)+(7-(-1)^n)*(25+8*i^(n(n+1)))-275)/400 where i=sqrt(-1). - _Bruno Berselli_, Dec 19 2011
%t With[{c=PadLeft[{},24,{1,2,3,0}]},Table[FromDigits[Take[c,n],7], {n,20}]] (* or *) LinearRecurrence[{7,0,0,1,-7},{1,9,66,462,3235},20] (* _Harvey P. Dale_, Oct 02 2011 *)
%o (Maxima) makelist((11*7^(n+1)+(7-(-1)^n)*(25+8*%i^(n*(n+1)))-275)/400, n, 1, 19); /* _Bruno Berselli_, Dec 19 2011 */
%K nonn,base,easy
%O 1,2
%A _Clark Kimberling_