login
Base-7 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,1.
1

%I #19 Mar 31 2023 17:11:15

%S 1,7,50,351,2457,17200,120401,842807,5899650,41297551,289082857,

%T 2023580000,14165060001,99155420007,694087940050,4858615580351,

%U 34010309062457,238072163437200,1666505144060401,11665536008422807,81658752058959650,571611264412717551

%N Base-7 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,1.

%H Colin Barker, <a href="/A033125/b033125.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (7,0,1,-7).

%F a(n) = 7*a(n-1) + a(n-3) - 7*a(n-4).

%F G.f.: x*(1 + x^2)/((1 - x)*(1 - 7*x)*(1 + x + x^2)). - _Colin Barker_, Dec 24 2015

%F From _Stefano Spezia_, Mar 31 2023: (Start)

%F E.g.f.: exp(-x/2)*(exp(3*x/2)*(25*exp(6*x) - 19) - 6*cos(sqrt(3)*x/2) + 8*sqrt(3)*sin(sqrt(3)*x/2))/171.

%F a(n) ~ 25*7^n/171. (End)

%t Table[FromDigits[PadRight[{},n,{1,0,1}],7],{n,30}] (* or *) LinearRecurrence[ {7,0,1,-7},{1,7,50,351},30] (* _Harvey P. Dale_, Feb 04 2019 *)

%o (PARI) Vec(x*(1+x^2)/((1-x)*(1-7*x)*(1+x+x^2)) + O(x^30)) \\ _Colin Barker_, Dec 24 2015

%Y Cf. A000420.

%K nonn,base,easy

%O 1,2

%A _Clark Kimberling_