A006053 a(n) = a(n-1) + 2*a(n-2) - a(n-3), with a(0) = a(1) = 0, a(2) = 1.
0, 0, 1, 1, 3, 4, 9, 14, 28, 47, 89, 155, 286, 507, 924, 1652, 2993, 5373, 9707, 17460, 31501, 56714, 102256, 184183, 331981, 598091, 1077870, 1942071, 3499720, 6305992, 11363361, 20475625, 36896355, 66484244, 119801329, 215873462, 388991876, 700937471
Offset: 0
Examples
G.f. = x^2 + x^3 + 3*x^4 + 4*x^5 + 9*x^6 + 14*x^7 + 28*x^8 + 47*x^9 + ... Regarding the description "number of compositions of n into floor(j/2) kinds of j's," the a(6)=9 compositions of 6 are (2a, 2a, 2a), (3a, 3a), (2a, 4a), (2a, 4b), (4a, 2a), (4b, 2a), (6a), (6b), (6c). - _Bridget Tenner_, Feb 25 2022
References
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- R. Witula, E. Hetmaniok and D. Slota, Sums of the powers of any order roots taken from the roots of a given polynomial, Proceedings of the 15th International Conference on Fibonacci Numbers and Their Applications (2012).
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Robin Chapman and Nicholas C. Singer, Eigenvalues of a bidiagonal matrix, Amer. Math. Monthly, 111 (2004), p. 441.
- Nachum Dershowitz, Between Broadway and the Hudson: A Bijection of Corridor Paths, arXiv:2006.06516 [math.CO], 2020.
- Tomislav Došlić, Mate Puljiz, Stjepan Šebek, and Josip Žubrinić, On a variant of Flory model, arXiv:2210.12411 [math.CO], 2022.
- Jia Huang, A coin flip game and generalizations of Fibonacci numbers, arXiv:2501.07463 [math.CO], 2025. See p. 9.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 433
- Mohammed L. Nadji, Moussa Ahmia, Daniel F. Checa, and José L. Ramírez, Arndt Compositions with Restricted Parts, Palindromes, and Colored Variants, J. Int. Seq. (2025) Vol. 28, Issue 3, Article 25.3.6. See p. 11.
- László Németh and Dragan Stevanović, Graph solution of system of recurrence equations, Research Gate, 2023. See Table 2 at p. 6.
- László Németh and László Szalay, Sequences Involving Square Zig-Zag Shapes, J. Int. Seq., Vol. 24 (2021), Article 21.5.2.
- 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
- R. Sachdeva and A. K. Agarwal, Combinatorics of certain restricted n-color composition functions, Discrete Mathematics, 340, (2017), 361-372.
- Genki Shibukawa, New identities for some symmetric polynomials and their applications, arXiv:1907.00334 [math.CA], 2019.
- P. Steinbach, Golden fields: a case for the heptagon, Math. Mag. 70 (1997), no. 1, 22-31.
- Kai Wang, Fibonacci Numbers And Trigonometric Functions Outline, (2019).
- Roman Witula, Ramanujan Type Trigonometric Formulas: The General Form for the Argument 2Pi/7, J. Integer Seq., 12 (2009), Article 09.8.5.
- Index entries for linear recurrences with constant coefficients, signature (1,2,-1).
Crossrefs
Programs
-
Haskell
a006053 n = a006053_list !! n a006053_list = 0 : 0 : 1 : zipWith (+) (drop 2 a006053_list) (zipWith (-) (map (2 *) $ tail a006053_list) a006053_list) -- Reinhard Zumkeller, Oct 14 2011
-
Magma
[ n eq 1 select 0 else n eq 2 select 0 else n eq 3 select 1 else Self(n-1) +2*Self(n-2) -Self(n-3): n in [1..40] ]; // Vincenzo Librandi, Aug 19 2011
-
Maple
a[0]:=0: a[1]:=0: a[2]:=1: for n from 3 to 40 do a[n]:=a[n-1]+2*a[n-2]-a[n-3] od:seq(a[n], n=0..40); # Emeric Deutsch A006053:=z**2/(1-z-2*z**2+z**3); # conjectured by Simon Plouffe in his 1992 dissertation
-
Mathematica
LinearRecurrence[{1,2,-1}, {0,0,1}, 50] (* Vladimir Joseph Stephan Orlovsky, May 25 2011 *)
-
PARI
{a(n) = if( n<0, n = -1-n; polcoeff( -1 / (1 - 2*x - x^2 + x^3) + x * O(x^n), n), polcoeff( x^2 / (1 - x - 2*x^2 + x^3) + x * O(x^n), n))}; /* Michael Somos, Nov 30 2014 */
-
SageMath
@CachedFunction def a(n): # a = A006053 if (n<3): return (n//2) else: return a(n-1) + 2*a(n-2) - a(n-3) [a(n) for n in range(41)] # G. C. Greubel, Feb 12 2023
Formula
G.f.: x^2/(1 - x - 2*x^2 + x^3). - Emeric Deutsch, Dec 14 2004
a(n) = c^(n-2) - a(n-1)*(c-1) + (1/c)*a(n-2) for n > 3 where c = 2*cos(Pi/7). Example: a(7) = 14 = c^5 - 9*(c-1) + 4/c = 18.997607... - 7.21743962... + 2.219832528... - Gary W. Adamson, Jan 24 2010
G.f.: -1 + 1/(1 - Sum_{j>=1} floor(j/2)*x^j). - Joerg Arndt, Jul 06 2011
First differences of A028495. - Floor van Lamoen, Nov 02 2005
a(n) = 2^n*(c(1)^(n-1)*(c(1)+c(2)) + c(3)^(n-1)*(c(3)+c(6)) + c(5)^(n-1)*(c(5)+c(4)) )/7, with c(j):=cos(Pi*j/7). - Herbert Kociemba, Dec 18 2011
a(n+1)*(-1)^n*49^(1/3) = (c(1)/c(4))^(1/3)*(2*c(1))^n + (c(2)/c(1))^(1/3)*(2*c(2))^n + (c(4)/c(2))^(1/3)*(2c(4))^n = (c(2)/c(1))^(1/3)*(2*c(1))^(n+1) + (c(4)/c(2))^(1/3)*(c(2))^(n+1) + (c(1)/c(4))^(1/3)*(2*c(4))^(n+1), where c(j) := cos(2Pi*j/7); for the proof, see Witula et al.'s papers. - Roman Witula, Jul 21 2012
The previous formula connects the sequence a(n) with A214683, A215076, A215100, A120757. We may call a(n) the Ramanujan-type sequence number 2 for the argument 2*Pi/7. - Roman Witula, Aug 02 2012
a(n) = -A006054(1-n) for all n in Z. - Michael Somos, Nov 30 2014
G.f.: x^2 / (1 - x / (1 - 2*x / (1 + 5*x / (2 - x / (5 - 2*x))))). - Michael Somos, Jan 20 2017
a(n) ~ r*c^n, where r=0.241717... is one of the roots of 49*x^3-7*x+1, and c=2*cos(Pi/7) (as in Gary W. Adamson's formula). - Daniel Checa, Nov 04 2022
a(2n-1) = 2*a(n+1)*a(n) - a(n)^2 - a(n-1)^2. - Richard Peterson, May 25 2023
Extensions
More terms from Emeric Deutsch, Dec 14 2004
Typo in definition fixed by Reinhard Zumkeller, Oct 14 2011
Comments