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.

A196787 a(n) = 3*a(n-1) - 2*a(n-2) - a(n-4) + a(n-5) with initial terms 1, 1, 1, 3, 6.

Original entry on oeis.org

1, 1, 1, 3, 6, 12, 24, 46, 87, 163, 303, 561, 1036, 1910, 3518, 6476, 11917, 21925, 40333, 74191, 136466, 251008, 461684, 849178, 1561891, 2872775, 5283867, 9718557, 17875224, 32877674, 60471482, 111224408, 204573593, 376269513, 692067545
Offset: 1

Views

Author

Aditya Subramanian, Oct 06 2011

Keywords

Examples

			a(7) = (a(6): 12) + (a(5): 6) + (a(4): 3) + (n-4: 3) = 24.
		

Programs

  • Mathematica
    LinearRecurrence[{3, -2, 0, -1, 1}, {1, 1, 1, 3, 6}, 42] (* T. D. Noe, Oct 06 2011 *)
  • PARI
    x='x+O('x^43); Vec(x*(-1+2*x-2*x^3) / ((x-1)^2*(x^3+x^2+x-1))) \\ Georg Fischer, Apr 03 2019

Formula

a(1)=1, a(2)=1, a(3)=1; a(n) = a(n-1) + a(n-2) + a(n-3) + n - 4 for n >= 4.
G.f.: x*(-1+2*x-2*x^3) / ((x-1)^2*(x^3+x^2+x-1)).

Extensions

Better name from Charles R Greathouse IV, Oct 06 2011
Edited and corrected by Georg Fischer, Apr 03 2019