A037681 Base-4 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,3,2.
1, 4, 19, 78, 313, 1252, 5011, 20046, 80185, 320740, 1282963, 5131854, 20527417, 82109668, 328438675, 1313754702, 5255018809, 21020075236, 84080300947, 336321203790, 1345284815161, 5381139260644, 21524557042579, 86098228170318
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (4,0,0,1,-4).
Programs
-
Mathematica
Table[FromDigits[PadRight[{},n,{1,0,3,2}],4],{n,30}] (* or *) LinearRecurrence[{4,0,0,1,-4},{1,4,19,78,313},30] (* Harvey P. Dale, May 10 2023 *)
Formula
G.f.: x*(1+3*x^2+2*x^3) / ( (x-1)*(4*x-1)*(1+x)*(x^2+1) ). - R. J. Mathar, May 04 2015