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”).

A037583
Base 4 digits are, in order, the first n terms of the periodic sequence with initial period 3,1.
1
3, 13, 55, 221, 887, 3549, 14199, 56797, 227191, 908765, 3635063, 14540253, 58161015, 232644061, 930576247, 3722304989, 14889219959, 59556879837, 238227519351, 952910077405, 3811640309623, 15246561238493, 60986244953975
OFFSET
1,1
FORMULA
G.f.: x*(3+x) / ( (x-1)*(4*x-1)*(1+x) ). - R. J. Mathar, Apr 26 2015
a(n) = floor(13*4^n/15). - Karl V. Keller, Jr., Aug 04 2021
EXAMPLE
In base 4, we get: 3, 31, 313, 3131, 31313, 313131, 3131313, 31313131, ... = A037589.
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {3, 1}], 4], {n, 30}] (* or *) LinearRecurrence[ {4, 1, -4}, {3, 13, 55}, 30] (* Harvey P. Dale, Sep 20 2020 *)
PROG
(Python) print([13*4**n//15 for n in range(1, 30)]) # Karl V. Keller, Jr., Aug 04 2021
KEYWORD
nonn,base,easy
STATUS
approved