Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #16 Sep 08 2022 08:44:52
%S 2,10,51,257,1285,6426,32132,160660,803301,4016507,20082535,100412676,
%T 502063382,2510316910,12551584551,62757922757,313789613785,
%U 1568948068926,7844740344632,39223701723160,196118508615801,980592543079007
%N Base 5 digits are, in order, the first n terms of the periodic sequence with initial period 2,0,1.
%H Vincenzo Librandi, <a href="/A037514/b037514.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 G.f.: x*(2+x^2) / ( (x-1)*(5*x-1)*(1+x+x^2) ). - _R. J. Mathar_, Nov 21 2011
%F a(n) = 5*a(n-1)+a(n-3)-5*a(n-4). - _Vincenzo Librandi_, May 31 2013
%t CoefficientList[Series[(2 + x^2) / ((x - 1) (5 x - 1) (1 + x + x^2)), {x, 0, 30}], x] (* _Vincenzo Librandi_, May 31 2013 *)
%o (Magma) I:=[2, 10, 51, 257]; [n le 4 select I[n] else 5*Self(n-1)+Self(n-3)-5*Self(n-4): n in [1..30]]; // _Vincenzo Librandi_, May 31 2013
%K nonn,base
%O 1,1
%A _Clark Kimberling_