%I M3786 N1542 #81 Jan 16 2024 04:48:06
%S 1,1,1,1,1,5,9,17,33,65,129,253,497,977,1921,3777,7425,14597,28697,
%T 56417,110913,218049,428673,842749,1656801,3257185,6403457,12588865,
%U 24749057,48655365,95653929,188050673,369697889,726806913,1428864769
%N 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.
%C 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
%C Satisfies Benford's law [see A186192] - _N. J. A. Sloane_, Feb 09 2017
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Indranil Ghosh, <a href="/A000322/b000322.txt">Table of n, a(n) for n = 0..3402</a> (terms 0..200 from T. D. Noe)
%H Joerg Arndt, <a href="http://www.jjj.de/fxt/#fxtbook">Matters Computational (The Fxtbook)</a>, pp. 311-312.
%H B. G. Baumgart, Letter to the editor <a href="http://www.fq.math.ca/Scanned/2-4/baumgart-a.pdf">Part 1</a> <a href="http://www.fq.math.ca/Scanned/2-4/baumgart-b.pdf">Part 2</a> <a href="http://www.fq.math.ca/Scanned/2-4/baumgart-c.pdf">Part 3</a>, Fib. Quart. 2 (1964), 260, 302.
%H D. Birmajer, J. B. Gil, and M. D. Weiner, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Gil/gil6.html">On the Enumeration of Restricted Words over a Finite Alphabet</a>, J. Int. Seq. 19 (2016) # 16.1.3, Example 7.
%H Martin Burtscher, Igor Szczyrba, and Rafał Szczyrba, <a href="http://www.emis.de/journals/JIS/VOL18/Szczyrba/sz3.pdf">Analytic Representations of the n-anacci Constants and Generalizations Thereof</a>, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.
%H Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
%H Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992.
%H Álvaro Serrano Holgado and Luis Manuel Navas Vicente, <a href="https://arxiv.org/abs/2301.11747">The zeta function of a recurrence sequence of arbitrary degree</a>, arXiv:2301.11747 [math.NT], 2023.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,1,1,1).
%H <a href="/index/Be#Benford">Index entries for sequences related to Benford's law</a>
%p 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.
%p 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
%t LinearRecurrence[{1,1,1,1,1},{1,1,1,1,1},50]
%o (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] ];
%o (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
%o (J) (see www.jsoftware.com) First construct the generating matrix
%o (((+ +/),]),:^:(1=#@$))/&.|.<:/~i.5
%o 1 1 1 1 1
%o 1 2 2 2 2
%o 2 3 4 4 4
%o 4 6 7 8 8
%o 8 12 14 15 16
%o Given that matrix, one can produce the first 2000 numbers in almost 17 millisecs by
%o ,((((+ +/),]),:^:(1=#@$))/&.|.<:/~i.5) (+/ . *)^:(i.400) 1 1 1 1 1x
%Y Cf. A000045, A000288, A000383, A060455, A186192.
%Y Cf. A001591 (Pentanacci numbers starting 0, 0, 0, 0, 1).
%K nonn,easy
%O 0,6
%A _N. J. A. Sloane_