login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #25 Aug 08 2021 09:36:37

%S 3,13,55,221,887,3549,14199,56797,227191,908765,3635063,14540253,

%T 58161015,232644061,930576247,3722304989,14889219959,59556879837,

%U 238227519351,952910077405,3811640309623,15246561238493,60986244953975

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

%H Harvey P. Dale, <a href="/A037583/b037583.txt">Table of n, a(n) for n = 1..1000</a>

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

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

%F a(n) = floor(13*4^n/15). - _Karl V. Keller, Jr._, Aug 04 2021

%e In base 4, we get: 3, 31, 313, 3131, 31313, 313131, 3131313, 31313131, ... = A037589.

%t Table[FromDigits[PadRight[{},n,{3,1}],4],{n,30}] (* or *) LinearRecurrence[ {4,1,-4},{3,13,55},30] (* _Harvey P. Dale_, Sep 20 2020 *)

%o (Python) print([13*4**n//15 for n in range(1,30)]) # _Karl V. Keller, Jr._, Aug 04 2021

%Y Cf. A007090, A037584, A037585, A037586, A037587, A037588, A037589.

%K nonn,base,easy

%O 1,1

%A _Clark Kimberling_