%I #33 Sep 08 2022 08:44:51
%S 1,5,20,81,325,1300,5201,20805,83220,332881,1331525,5326100,21304401,
%T 85217605,340870420,1363481681,5453926725,21815706900,87262827601,
%U 349051310405,1396205241620,5584820966481,22339283865925,89357135463700
%N Base-4 digits are, in order, the first n terms of the periodic sequence with initial period 1,1,0.
%H Vincenzo Librandi, <a href="/A033131/b033131.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec">Index entries for linear recurrences with constant coefficients</a>, signature (4,0,1,-4).
%F a(n) = 4*a(n-1) + a(n-3) - 4*a(n-4).
%F G.f.: x*(x+1)/((x-1)*(4*x-1)*(1+x+x^2)). - _Vincenzo Librandi_, Jun 21 2012
%F a(n) = floor( (20/63)*4^n ). - _Tani Akinari_, Jul 16 2014
%e The first six terms have base-4 representations 1, 11, 110, 1101, 11011, 110110.
%t LinearRecurrence[{4,0,1,-4},{1,4,17,69},30] (* _Vincenzo Librandi_, Jun 21 2012 *)
%t With[{nn=30},Table[FromDigits[PadRight[{},n,{1,1,0}],4],{n,nn}]] (* _Harvey P. Dale_, Oct 22 2015 *)
%o (Magma) I:=[1, 5, 20, 81]; [n le 4 select I[n] else 4*Self(n-1)+Self(n-3)-4*Self(n-4): n in [1..30]]; // _Vincenzo Librandi_, Jun 21 2012
%Y Cf. A033137 (similar in base 10).
%K nonn,base,easy
%O 1,2
%A _Clark Kimberling_