[go: up one dir, main page]

login
A033123
Base-5 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,1.
1
1, 5, 26, 131, 655, 3276, 16381, 81905, 409526, 2047631, 10238155, 51190776, 255953881, 1279769405, 6398847026, 31994235131, 159971175655, 799855878276, 3999279391381, 19996396956905, 99981984784526, 499909923922631, 2499549619613155, 12497748098065776
OFFSET
1,2
FORMULA
a(n) = 5*a(n-1) + a(n-3) - 5*a(n-4).
G.f.: x*(1+x^2) / ((1-x)*(1-5*x)*(1+x+x^2)). - Colin Barker, Dec 24 2015
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {1, 0, 1}], 5], {n, 30}] (* or *) LinearRecurrence[ {5, 0, 1, -5}, {1, 5, 26, 131}, 30] (* Harvey P. Dale, Mar 25 2019 *)
PROG
(PARI) Vec(x*(1+x^2)/((1-x)*(1-5*x)*(1+x+x^2)) + O(x^30)) \\ Colin Barker, Dec 24 2015
CROSSREFS
Sequence in context: A244617 A003583 A033115 * A331883 A047770 A047757
KEYWORD
nonn,base,easy
STATUS
approved