A000078 Tetranacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) for n >= 4 with a(0) = a(1) = a(2) = 0 and a(3) = 1.
0, 0, 0, 1, 1, 2, 4, 8, 15, 29, 56, 108, 208, 401, 773, 1490, 2872, 5536, 10671, 20569, 39648, 76424, 147312, 283953, 547337, 1055026, 2033628, 3919944, 7555935, 14564533, 28074040, 54114452, 104308960, 201061985, 387559437, 747044834, 1439975216, 2775641472
Offset: 0
Examples
From _Petros Hadjicostas_, Mar 10 2018: (Start) For n = 3, we get a(3+4) = a(7) = 8 palindromic compositions of 2*n+1 = 7 into an odd number of parts that are not a multiple of 4. They are the following: 7 = 1+5+1 = 3+1+3 = 2+3+2 = 1+2+1+2+1 = 2+1+1+1+2 = 1+1+3+1+1 = 1+1+1+1+1+1+1. If we put these compositions on a circle, they become bilaterally symmetric cyclic compositions of 2*n+1 = 7. For n = 4, we get a(4+4) = a(8) = 15 palindromic compositions of 2*n + 1 = 9 into an odd number of parts that are not a multiple of 4. They are the following: 9 = 3+3+3 = 2+5+2 = 1+7+1 = 1+1+5+1+1 = 2+1+3+1+2 = 1+2+3+2+1 = 1+3+1+3+1 = 3+1+1+1+3 = 2+2+1+2+2 = 2+1+1+1+1+1+2 = 1+2+1+1+1+2+1 = 1+1+2+1+2+1+1 = 1+1+1+3+1+1+1 = 1+1+1+1+1+1+1+1+1. As _David Callan_ points out in the comments above, for n >= 1, a(n+4) is also the number of 0-1 sequences of length n that avoid 1111. For example, for n = 5, a(5+4) = a(9) = 29 is the number of binary strings of length n that avoid 1111. Out of the 2^5 = 32 binary strings of length n = 5, the following do not avoid 1111: 11111, 01111, and 11110. (End)
References
- Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
- G. Pólya and G. Szegő, Problems and Theorems in Analysis, Springer-Verlag, NY, 2 vols., 1972, Vol. 1, p. 1, Problems 3 and 4.
- J. Riordan, An Introduction to Combinatorial Analysis, Princeton University Press, Princeton, NJ, 1978.
- 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
- Indranil Ghosh, Table of n, a(n) for n = 0..3505 (terms 0..200 from T. D. Noe)
- Abdullah Açikel, Amrouche Said, Hacene Belbachir, and Nurettin Irmak, On k-generalized Lucas sequence with its triangle, Turkish J. Math. (2023) Vol. 47, No. 4, Art. 6, 1129-1143. See p. 1130.
- Isha Agarwal, Matvey Borodin, Aidan Duncan, Kaylee Ji, Tanya Khovanova, Shane Lee, Boyan Litchev, Anshul Rastogi, Garima Rastogi, and Andrew Zhao, From Unequal Chance to a Coin Game Dance: Variants of Penney's Game, arXiv:2006.13002 [math.HO], 2020.
- 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.
- Kassie Archer and Noel Bourne, Pattern avoidance in compositions and powers of permutations, arXiv:2505.05218 [math.CO], 2025. See pp. 2, 6, 8.
- Kassie Archer and Aaron Geary, Powers of permutations that avoid chains of patterns, arXiv:2312.14351 [math.CO], 2023. See p. 15.
- Joerg Arndt, Matters Computational (The Fxtbook), pp. 307-309.
- Vladimir Baltic, On the number of certain types of strongly restricted permutations, Applicable Analysis and Discrete Mathematics 4(1) (2010), 119-135.
- Elena Barcucci, Antonio Bernini, Stefano Bilotta, and Renzo Pinzani, Non-overlapping matrices, arXiv:1601.07723 [cs.DM], 2016.
- Erik Bates, Blan Morrison, Mason Rogers, Arianna Serafini, and Anav Sood, A new combinatorial interpretation of partial sums of m-step Fibonacci numbers, arXiv:2503.11055 [math.CO], 2025. See p. 2.
- Martin Burtscher, Igor Szczyrba, and Rafał Szczyrba, Analytic Representations of the n-anacci Constants and Generalizations Thereof, J. Integer Seq. 18 (2015), Article 15.4.5.
- P. J. Cameron, Sequences realized by oligomorphic permutation groups, J. Integer Seq. 3 (2000), Article 00.1.5.
- S. A. Corey and Otto Dunkel, Problem 2803, Amer. Math. Monthly 33 (1926), 229-232.
- F. Michel Dekking, Morphisms, Symbolic Sequences, and Their Standard Forms, J. Integer Seq. 19 (2016), Article 16.1.1.
- Emeric Deutsch, Problem 1613: A recursion in four parts, Math. Mag. 75(1) (2002), 64-65.
- Ömür Deveci, Zafer Adıgüzel and Taha Doğan, On the Generalized Fibonacci-circulant-Hurwitz numbers, Notes on Number Theory and Discrete Mathematics (2020) Vol. 26, No. 1, 179-190.
- G. P. B. Dresden and Z. Du, A Simplified Binet Formula for k-Generalized Fibonacci Numbers, J. Integer Seq. 17 (2014), Article 14.4.7.
- M. Feinberg, Fibonacci-Tribonacci, Fib. Quart. 1(3) (1963), 71-74.
- Taras Goy and Mark Shattuck, Some Toeplitz-Hessenberg determinant identities for the tetranacci numbers, J. Integer Seq. 23 (2020), Article 20.6.8.
- Petros Hadjicostas, Cyclic compositions of a positive integer with parts avoiding an arithmetic sequence, J. Integer Seq. 19 (2016), Article 16.8.2.
- Petros Hadjicostas, Generalized colored circular palindromic compositions, Moscow Journal of Combinatorics and Number Theory, 9(2) (2020), 173-186.
- P. Hadjicostas and L. Zhang, Sommerville's symmetrical cyclic compositions of a positive integer with parts avoiding multiples of an integer, Fibonacci Quarterly 55 (2017), 54-73.
- Russell Jay Hendel, A Method for Uniformly Proving a Family of Identities, arXiv:2107.03549 [math.CO], 2021.
- F. T. Howard and Curtis Cooper, Some identities for r-Fibonacci numbers, Fibonacci Quarterly 49 (2011), 231-242.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 11
- Ziqian Jin, Tetrancci Identities With Squares, Dominoes, And Hexagonal Double Strips, arXiv:1907.09935 [math.GM], 2019.
- Omar Khadir, László Németh, and László Szalay, Tiling of dominoes with ranked colors, Results in Math. (2024) Vol. 79, Art. No. 253. See p. 2.
- Sergey Kirgizov, Q-bonacci words and numbers, arXiv:2201.00782 [math.CO], 2022.
- W. C. Lynch, The t-Fibonacci numbers and polyphase sorting, Fib. Quart., 8 (1970), 6-22.
- T. Mansour and M. Shattuck, A monotonicity property for generalized Fibonacci sequences, arXiv:1410.6943 [math.CO], 2014.
- Tony D. Noe and Jonathan Vos Post, Primes in Fibonacci n-step and Lucas n-step Sequences, J. Integer Seq. 8 (2005), Article 05.4.4.
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
- H. Prodinger, Counting Palindromes According to r-Runs of Ones Using Generating Functions, J. Integer Seq. 17 (2014), Article 14.6.2; odd length middle 0, r=3.
- Helmut Prodinger and Sarah J. Selkirk, Sums of squares of Tetranacci numbers: A generating function approach, arXiv:1906.08336 [math.NT], 2019.
- Lan Qi and Zhuoyu Chen, Identities Involving the Fourth-Order Linear Recurrence Sequence, Symmetry 11(12) (2019), 1476, 8pp.
- J. L. Ramírez and V. F. Sirvent, A Generalization of the k-Bonacci Sequence from Riordan Arrays, Electron. J. Combin. 22(1) (2015), #P1.38.
- O. Turek, Abelian Complexity Function of the Tribonacci Word, J. Integer Seq. 18 (2015), Article 15.3.4.
- Kai Wang, Identities for generalized enneanacci numbers, Generalized Fibonacci Sequences (2020).
- Eric Weisstein's World of Mathematics, Fibonacci n-Step Number.
- Eric Weisstein's World of Mathematics, Tetranacci Number.
- L. Zhang and P. Hadjicostas, On sequences of independent Bernoulli trials avoiding the pattern '11..1', Math. Scientist, 40 (2015), 89-96.
- Index entries for linear recurrences with constant coefficients, signature (1,1,1,1).
Crossrefs
Programs
-
GAP
a:=[0,0,0,1];; for n in [5..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]+a[n-4]; od; a; # Muniru A Asiru, Mar 11 2018
-
Haskell
import Data.List (tails, transpose) a000078 n = a000078_list !! n a000078_list = 0 : 0 : 0 : f [0,0,0,1] where f xs = y : f (y:xs) where y = sum $ head $ transpose $ take 4 $ tails xs -- Reinhard Zumkeller, Jul 06 2014, Apr 28 2011
-
Magma
[n le 4 select Floor(n/4) else Self(n-1)+Self(n-2)+Self(n-3)+Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jan 29 2016
-
Maple
a:= n-> (<<1|1|0|0>, <1|0|1|0>, <1|0|0|1>, <1|0|0|0>>^n)[1, 4]: seq(a(n), n=0..50); # Alois P. Heinz, Jun 12 2008
-
Mathematica
CoefficientList[Series[x^3/(1-x-x^2-x^3-x^4), {x, 0, 50}], x] LinearRecurrence[{1,1,1,1}, {0,0,0,1}, 50] (* Vladimir Joseph Stephan Orlovsky, May 25 2011 *) (* From Eric W. Weisstein, Nov 09 2017 *) Table[RootSum[-1 -# -#^2 -#^3 +#^4 &, 10#^n +157#^(n+1) -103 #^(n+2) +16#^(n+3) &]/563, {n, 0, 40}] Table[RootSum[#^4 -#^3 -#^2 -# -1 &, #^(n-2)/(-#^3 +6# -1) &], {n, 0, 40}] (* End *)
-
Maxima
a(n):=sum(sum(if mod(5*k-i,4)>0 then 0 else binomial(k,(5*k-i)/4)*(-1)^((i-k)/4)*binomial(n-i+k-1,k-1),i,k,n),k,1,n); /* Vladimir Kruchinin, Aug 18 2010 */
-
PARI
{a(n) = if( n<0, 0, polcoeff( x^3 / (1 - x - x^2 - x^3 - x^4) + x * O(x^n), n))}
-
Python
A000078 = [0,0,0,1] for n in range(4, 100): A000078.append(A000078[n-1]+A000078[n-2]+A000078[n-3]+A000078[n-4]) # Chai Wah Wu, Aug 20 2014
Formula
a(n) = A001630(n) - a(n-1). - Henry Bottomley
G.f.: x^3/(1 - x - x^2 - x^3 - x^4). - Simon Plouffe in his 1992 dissertation
G.f.: x^3 / (1 - x / (1 - x / (1 + x^3 / (1 + x / (1 - x / (1 + x)))))). - Michael Somos, May 12 2012
G.f.: Sum_{n >= 0} x^(n+3) * (Product_{k = 1..n} (k + k*x + k*x^2 + x^3)/(1 + k*x + k*x^2 + k*x^3)). - Peter Bala, Jan 04 2015
a(n) = term (1,4) in the 4 X 4 matrix [1,1,0,0; 1,0,1,0; 1,0,0,1; 1,0,0,0]^n. - Alois P. Heinz, Jun 12 2008
Another form of the g.f.: f(z) = (z^3 - z^4)/(1 - 2*z + z^5), then a(n) = Sum_{i=0..floor((n-3)/5)} (-1)^i*binomial(n-3-4*i, i)*2^(n - 3 - 5*i) - Sum_{i=0..floor((n-4)/5)} (-1)^i*binomial(n-4-4*i, i)*2^(n - 4 - 5*i) with natural convention Sum_{i=m..n} alpha(i) = 0 for m > n. - Richard Choulet, Feb 22 2010
a(n+3) = Sum_{k=1..n} Sum_{i=k..n} [(5*k-i mod 4) = 0] * binomial(k, (5*k-i)/4) *(-1)^((i-k)/4) * binomial(n-i+k-1,k-1), n > 0. - Vladimir Kruchinin, Aug 18 2010 [Edited by Petros Hadjicostas, Jul 26 2020, so that the formula agrees with the offset of the sequence]
Sum_{k=0..3*n} a(k+b) * A008287(n,k) = a(4*n+b), b >= 0 ("quadrinomial transform"). - N. J. A. Sloane, Nov 10 2010
G.f.: x^3*(1 + x*(G(0)-1)/(x+1)) where G(k) = 1 + (1+x+x^2+x^3)/(1-x/(x+1/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 26 2013
Starting (1, 2, 4, 8, ...) = the INVERT transform of (1, 1, 1, 1, 0, 0, 0, ...). - Gary W. Adamson, May 13 2013
a(n) ~ c*r^n, where c = 0.079077767399388561146007... and r = 1.92756197548292530426195... = A086088 (One of the roots of the g.f. denominator polynomial is 1/r.). - Fung Lam, Apr 29 2014
a(n) = 2*a(n-1) - a(n-5), n >= 5. - Bob Selcoe, Jul 06 2014
From Ziqian Jin, Jul 28 2019: (Start)
a(2*n+5) = a(n+4)^2 + a(n+3)^2 + a(n+2)^2 + 2*a(n+3)*(a(n+2) + a(n+1)).
a(n) - 1 = a(n-2) + 2*a(n-3) + 3*(a(n-4) + a(n-5) + ... + a(2) + a(1)), n >= 4. (End)
a(n) = (Sum_{i=0..n-1} a(i)*A073817(n-i))/(n-3) for n > 3. - Greg Dresden and Advika Srivastava, Sep 28 2019
a(n) = Sum_{r root of x^4-x^3-x^2-x-1} r^n/(4*r^3-3*r^2-2*r-1). - Fabian Pereyra, Dec 06 2024
Extensions
Definition augmented (with 4 initial terms) by Daniel Forgues, Dec 02 2009
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021
Comments