login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #10 Jun 13 2015 00:49:16

%S 1,6,26,105,422,1690,6761,27046,108186,432745,1730982,6923930,

%T 27695721,110782886,443131546,1772526185,7090104742,28360418970,

%U 113441675881,453766703526,1815066814106,7260267256425,29041069025702

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

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

%F G.f.: x*(1+2*x+2*x^2) / ( (x-1)*(4*x-1)*(1+x+x^2) ). - _R. J. Mathar_, Apr 30 2015

%F a(1)=1, a(2)=6, a(3)=26, a(4)=105, a(n)=4*a(n-1)+a(n-3)-4*a(n-4). - _Harvey P. Dale_, May 22 2015

%t Module[{nn=30,c},c=PadRight[{},nn,{1,2,2}];Table[FromDigits[Take[c,n],4],{n,nn}]] (* or *) LinearRecurrence[{4,0,1,-4},{1,6,26,105},30] (* _Harvey P. Dale_, May 22 2015 *)

%K nonn,base,easy

%O 1,2

%A _Clark Kimberling_