cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A238391 Expansion of (1+x)/(1-x^2-3*x^5).

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 4, 7, 7, 10, 19, 22, 40, 43, 70, 100, 136, 220, 265, 430, 565, 838, 1225, 1633, 2515, 3328, 5029, 7003, 9928, 14548, 19912, 29635, 40921, 59419, 84565, 119155, 173470, 241918, 351727, 495613, 709192, 1016023, 1434946, 2071204, 2921785, 4198780, 5969854, 8503618, 12183466, 17268973, 24779806
Offset: 0

Views

Author

Sergio Falcon, Feb 26 2014

Keywords

Examples

			a(5) = 3*a(0)+a(3)=4; a(6) = 3*a(1)+a(4)=4; a(7) = 3*a(2)+a(5)=7.
		

Programs

  • Mathematica
    For[j = 0, j < 5, j++, a[j] = 1]; For[j = 5, j < 51, j++, a[j] = 3 a[j - 5] + a[j - 2]]; Table[a[j], {j, 0, 50}]
    CoefficientList[Series[(1 + x)/(1 - x^2 - 3 x^5), {x, 0, 50}], x] (* Michael De Vlieger, Jan 27 2016 *)
  • PARI
    Vec((1+x)/(1-x^2-3*x^5) + O(x^50)) \\ Michel Marcus, Jan 27 2016

Formula

a(0)=1, a(1)=1, a(2)=1, a(3)=1, a(4)=1; a(n) = 3*a(n-5)+a(n-2) for n>4.
a(2n) = Sum_{j=0..n/5} binomial(n-3j,2j)*3^(2j) + Sum_{j=0..(n-3)/5} binomial(n-2-3j,2j+1)*3^(2j+1).
a(2n+1) = Sum_{j=0..n/5} binomial(n-3j,2j)*3^{2j} + Sum_{j=0..(n-2)/5} binomial(n-1-3j,2j+1)*3^(2j+1).