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

%I #17 Mar 25 2019 11:46:00

%S 1,5,26,131,655,3276,16381,81905,409526,2047631,10238155,51190776,

%T 255953881,1279769405,6398847026,31994235131,159971175655,

%U 799855878276,3999279391381,19996396956905,99981984784526,499909923922631,2499549619613155,12497748098065776

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

%H Colin Barker, <a href="/A033123/b033123.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 (5,0,1,-5).

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

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

%t Table[FromDigits[PadRight[{},n,{1,0,1}],5],{n,30}] (* or *) LinearRecurrence[ {5,0,1,-5},{1,5,26,131},30] (* _Harvey P. Dale_, Mar 25 2019 *)

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

%K nonn,base,easy

%O 1,2

%A _Clark Kimberling_