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.

A001648 Tetranacci numbers A073817 without the leading term 4.

Original entry on oeis.org

1, 3, 7, 15, 26, 51, 99, 191, 367, 708, 1365, 2631, 5071, 9775, 18842, 36319, 70007, 134943, 260111, 501380, 966441, 1862875, 3590807, 6921503, 13341626, 25716811, 49570747, 95550687, 184179871, 355018116, 684319421, 1319068095, 2542585503, 4900991135
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    I:=[1,3,7,15]; [n le 4 select I[n] else Self(n-1) + Self(n-2) + Self(n-3) + Self(n-4): n in [1..30]]; // G. C. Greubel, Dec 18 2017
  • Maple
    A001648:=-(1+2*z+3*z**2+4*z**3)/(-1+z+z**2+z**3+z**4); # conjectured by Simon Plouffe in his 1992 dissertation
  • Mathematica
    Rest@ CoefficientList[ Series[(4 - 3 x - 2 x^2 - x^3)/(1 - x - x^2 - x^3 - x^4), {x, 0, 40}], x] (* Or *)
    a[0] = 4; a[1] = 1; a[2] = 3; a[3] = 7; a[4] = 15; a[n_] := 2*a[n - 1] - a[n - 5]; Array[a, 33] (* Robert G. Wilson v *)
    LinearRecurrence[{1, 1, 1, 1}, {1, 3, 7, 15}, 60] (* Vladimir Joseph Stephan Orlovsky, Feb 08 2012 *)
  • Maxima
    a(n):=n*sum(sum((-1)^i*binomial(k,k-i)*binomial(n-i*4-1,k-1),i,0,((n-k)/4))/k,k,ceiling(n/5),n); /* Vladimir Kruchinin, Jan 20 2012 */
    
  • PARI
    a(n)=if(n<0,0,polcoeff(x*(1+2*x+3*x^2+4*x^3)/(1-x-x^2-x^3-x^4)+x*O(x^n),n))
    

Formula

G.f.: x*(1+2*x+3*x^2+4*x^3)/(1-x-x^2-x^3-x^4).
a(n) = trace of M^n, where M = the 4 X 4 matrix [ 0 1 0 0 / 0 0 1 0 / 0 0 0 1 / 1 1 1 1]. E.g., the trace (sum of diagonal terms) of M^12 = a(12) = 2631 = (108 + 316 + 717 + 1490). - Gary W. Adamson, Feb 22 2004
a(n) = n*Sum_{k=ceiling(n/5)..n} Sum_{i=0..(n-k)/4} (-1)^i*binomial(k,k-i)*binomial(n-i*4-1,k-1)/k, n>0. - Vladimir Kruchinin, Jan 20 2012