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.

A000322 Pentanacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5) with a(0) = a(1) = a(2) = a(3) = a(4) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 5, 9, 17, 33, 65, 129, 253, 497, 977, 1921, 3777, 7425, 14597, 28697, 56417, 110913, 218049, 428673, 842749, 1656801, 3257185, 6403457, 12588865, 24749057, 48655365, 95653929, 188050673, 369697889, 726806913, 1428864769
Offset: 0

Views

Author

Keywords

Comments

For n>=0: a(n+2) is the number of length-n words with letters {0,1,2,3,4} where the letter x is followed by at least x zeros, see fxtbook link below. - Joerg Arndt, Apr 08 2011
Satisfies Benford's law [see A186192] - N. J. A. Sloane, Feb 09 2017

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

Cf. A001591 (Pentanacci numbers starting 0, 0, 0, 0, 1).

Programs

  • Magma
    [ n le 5 select 1 else Self(n-1)+Self(n-2)+Self(n-3)+Self(n-4)+Self(n-5): n in [1..40] ];
    
  • Maple
    A000322:=(-1+z**2+2*z**3+3*z**4)/(-1+z**2+z**3+z+z**4+z**5); # Simon Plouffe in his 1992 dissertation.
    a:= n-> (Matrix([[1$5]]). Matrix(5, (i,j)-> if (i=j-1) or j=1 then 1 else 0 fi)^n)[1,5]: seq (a(n), n=0..28); # Alois P. Heinz, Aug 26 2008
  • Mathematica
    LinearRecurrence[{1,1,1,1,1},{1,1,1,1,1},50]
  • PARI
    Vec((1-x^2-2*x^3-3*x^4)/(1-x-x^2-x^3-x^4-x^5)+O(x^99)) \\ Charles R Greathouse IV, Jul 01 2013