|
|
A001591
|
|
Pentanacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5), a(0)=a(1)=a(2)=a(3)=0, a(4)=1.
(Formerly M1122 N0429)
|
|
57
|
|
|
0, 0, 0, 0, 1, 1, 2, 4, 8, 16, 31, 61, 120, 236, 464, 912, 1793, 3525, 6930, 13624, 26784, 52656, 103519, 203513, 400096, 786568, 1546352, 3040048, 5976577, 11749641, 23099186, 45411804, 89277256, 175514464, 345052351, 678355061, 1333610936, 2621810068
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,7
|
|
COMMENTS
|
Number of permutations satisfying -k <= p(i) - i <= r, i=1..n-4, with k=1, r=4. - Vladimir Baltic, Jan 17 2005
a(n) is the number of compositions of n-4 with no part greater than 5. - Vladimir Baltic, Jan 17 2005
The pentanomial (A035343(n)) transform of a(n) is a(5n+4), n >= 0. - Bob Selcoe, Jun 10 2014
a(n) is the number of ways to tile a strip of length n-4 with squares, dominoes, trominoes (of length 3), and rectangles with length 4 (tetraminoes) and length 5 (pentaminoes). - Wajdi Maaloul, Jun 21 2022
|
|
REFERENCES
|
Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
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).
|
|
LINKS
|
Tomás Aguilar-Fraga, Jennifer Elder, Rebecca E. Garcia, Kimberly P. Hadaway, Pamela E. Harris, Kimberly J. Harry, Imhotep B. Hogan, Jakeyl Johnson, Jan Kretschmann, Kobe Lawson-Chavanu, J. Carlos Martínez Mori, Casandra D. Monroe, Daniel Quiñonez, Dirk Tolson III, and Dwight Anderson Williams II, Interval and L-interval Rational Parking Functions, arXiv:2311.14055 [math.CO], 2023. See p. 14.
|
|
FORMULA
|
G.f.: x^4/(1 - x - x^2 - x^3 - x^4 - x^5). - Simon Plouffe in his 1992 dissertation.
G.f.: Sum_{n >= 0} x^(n+4) * (Product_{k = 1..n} (k + k*x + k*x^2 + k*x^3 + x^4)/(1 + k*x + k*x^2 + k*x^3 + k*x^4)). - Peter Bala, Jan 04 2015
Another form of the g.f.: f(z) = (z^4-z^5)/(1-2*z+z^6); then a(n) = Sum_{i=0..floor((n-4)/6)} ((-1)^i*binomial(n-4-5*i,i)*2^(n-4-6*i)) - Sum_{i=0..floor((n-5)/6)} ((-1)^i*binomial(n-5-5*i,i)*2^(n-5-6*i)) with convention Sum_{i=m..n} alpha(i) = 0 for m > n. - Richard Choulet, Feb 22 2010
a(n) = Sum_{k=1..n} (Sum_{r=0..k} (binomial(k,r) * Sum_{m=0..r} (binomial(r,m) * Sum_{j=0..m} (binomial(m,j)*binomial(j,n-m-k-j-r))))), n > 0. - Vladimir Kruchinin, Aug 30 2010
Sum_{k=0..4*n} a(k+b)*A035343(n,k) = a(5*n+b), b >= 0.
|
|
EXAMPLE
|
n=2: a(14) = (1*1 + 2*1 + 3*2 + 4*4 + 5*8 + 4*16 + 3*31 + 2*61 + 1*120) = 464. - Bob Selcoe, Jun 10 2014
G.f. = x^4 + x^5 + 2*x^6 + 4*x^7 + 8*x^8 + 16*x^9 + 31*x^10 + 120*x^11 + ...
|
|
MAPLE
|
g:=1/(1-z-z^2-z^3-z^4-z^5): gser:=series(g, z=0, 49): seq((coeff(gser, z, n)), n=-4..32); # Zerinvary Lajos, Apr 17 2009
# second Maple program:
a:= n-> (<<0|1|0|0|0>, <0|0|1|0|0>, <0|0|0|1|0>, <0|0|0|0|1>, <1|1|1|1|1>>^n)[1, 5]:
|
|
MATHEMATICA
|
CoefficientList[Series[x^4/(1 - x - x^2 - x^3 - x^4 - x^5), {x, 0, 50}], x]
a[0] = a[1] = a[2] = a[3] = 0; a[4] = a[5] = 1; a[n_] := a[n] = 2 a[n - 1] - a[n - 6]; Array[a, 37, 0]
LinearRecurrence[{1, 1, 1, 1, 1}, {0, 0, 0, 0, 1}, 50] (* Vladimir Joseph Stephan Orlovsky, May 25 2011 *)
|
|
PROG
|
(PARI) a=vector(100); a[4]=a[5]=1; for(n=6, #a, a[n]=a[n-1]+a[n-2]+a[n-3]+a[n-4]+a[n-5]); concat(0, a) \\ Charles R Greathouse IV, Jul 15 2011
(PARI) a(n)= {my(x='x, p=polrecip(1 - x - x^2 - x^3 - x^4 - x^5)); polcoef(lift(Mod(x, p)^n), 4); }
(Maxima) a(n):=mod(floor(10^((n-4)*(n+1))*10^(5*(n+1))*(10^(n+1)-1)/(10^(6*(n+1))-2*10^(5*(n+1))+1)), 10^n); /* Tani Akinari, Apr 10 2014 */
(Magma) a:=[0, 0, 0, 0, 1]; [n le 5 select a[n] else Self(n-1) + Self(n-2) + Self(n-3) + Self(n-4) + Self(n-5): n in [1..40]]; // Marius A. Burtea, Oct 03 2019
(Python)
def pentanacci():
a, b, c, d, e = 0, 0, 0, 0, 1
while True:
yield a
a, b, c, d, e = b, c, d, e, a + b + c + d + e
f = pentanacci()
print([next(f) for _ in range(100)]) # Reza K Ghazi Apr 09 2021
|
|
CROSSREFS
|
Row 5 of arrays A048887 and A092921 (k-generalized Fibonacci numbers).
Cf. A106303 (Pisano period lengths).
Cf. A035343 (pentanomial coefficients).
|
|
KEYWORD
|
nonn,easy,changed
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|