A006918 a(n) = binomial(n+3, 3)/4 for odd n, n*(n+2)*(n+4)/24 for even n.
0, 1, 2, 5, 8, 14, 20, 30, 40, 55, 70, 91, 112, 140, 168, 204, 240, 285, 330, 385, 440, 506, 572, 650, 728, 819, 910, 1015, 1120, 1240, 1360, 1496, 1632, 1785, 1938, 2109, 2280, 2470, 2660, 2870, 3080, 3311, 3542, 3795, 4048, 4324, 4600, 4900, 5200, 5525, 5850, 6201, 6552, 6930
Offset: 0
Examples
G.f. = x + 2*x^2 + 5*x^3 + 8*x^4 + 14*x^5 + 20*x^6 + 30*x^7 + 40*x^8 + 55*x^9 + ... From _Gus Wiseman_, Apr 06 2019: (Start) The a(4 - 3) = 1 through a(8 - 3) = 14 integer partitions with Durfee square of length 2 are the following (see Franklin T. Adams-Watters's second comment). The Heinz numbers of these partitions are given by A325164. (22) (32) (33) (43) (44) (221) (42) (52) (53) (222) (322) (62) (321) (331) (332) (2211) (421) (422) (2221) (431) (3211) (521) (22111) (2222) (3221) (3311) (4211) (22211) (32111) (221111) The a(0 + 1) = 1 through a(4 + 1) = 14 integer partitions of n into parts of two kinds with at most two parts of each kind are the following (see Franklin T. Adams-Watters's first comment). ()() ()(1) ()(2) ()(3) ()(4) (1)() (2)() (3)() (4)() ()(11) (1)(2) (1)(3) (1)(1) ()(21) ()(22) (11)() (2)(1) (2)(2) (21)() (22)() (1)(11) ()(31) (11)(1) (3)(1) (31)() (11)(2) (1)(21) (2)(11) (21)(1) (11)(11) The a(6 - 5) = 1 through a(10 - 5) = 14 integer partitions whose third part is 2 are the following (see Emeric Deutsch's comment). The Heinz numbers of these partitions are given by A307373. (222) (322) (332) (432) (442) (2221) (422) (522) (532) (2222) (3222) (622) (3221) (3321) (3322) (22211) (4221) (4222) (22221) (4321) (32211) (5221) (222111) (22222) (32221) (33211) (42211) (222211) (322111) (2221111) (End)
References
- J. M. Borwein, D. H. Bailey and R. Girgensohn, Experimentation in Mathematics, A K Peters, Ltd., Natick, MA, 2004. x+357 pp. See p. 147.
- M. Kac, An example of "counting without counting", Philips Res. Reports, 30 (1975), 20*-22* [Special issue in honour of C. J. Bouwkamp].
- E. V. McLaughlin, Numbers of factorizations in non-unique factorial domains, Senior Thesis, Allegeny College, Meadville, PA, 2004.
- K. B. Reid and L. W. Beineke "Tournaments", pp. 169-204 in L. W. Beineke and R. J. Wilson, editors, Selected Topics in Graph Theory, Academic Press, NY, 1978, p. 186, Theorem 6.11.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 2nd ed., 2012, Exercise 4.16, pp. 530, 552.
- W. A. Whitworth, DCC Exercises in Choice and Chance, Stechert, NY, 1945, p. 33.
Links
- T. D. Noe, Table of n, a(n) for n = 0..1000
- Jean-Luc Baril, Alexander Burstein, and Sergey Kirgizov, Pattern statistics in faro words and permutations, arXiv:2010.06270 [math.CO], 2020.
- David J. Broadhurst, On the enumeration of irreducible k-fold Euler sums and their roles in knot theory and field theory, arXiv:hep-th/9604128, 1996.
- David Broadhurst and Xavier Roulleau, Number of partitions of modular integers, arXiv:2502.19523 [math.NT], 2025. See p. 19.
- Yuriy Choliy and Andrew V. Sills, A formula for the partition function that “counts”, Preprint 2015.
- L. Colmenarejo, Combinatorics on several families of Kronecker coefficients related to plane partitions, arXiv:1604.00803 [math.CO], 2016. See Table 1 p. 5.
- S. J. Cyvin et al., Polygonal systems including the corannulene and coronene homologs: novel applications of Pólya's theorem, Z. Naturforsch., 52a (1997), 867-873.
- Steven Edwards and William Griffiths, Generalizations of Delannoy and cross polytope numbers, Fib. Q., Vol. 55, No. 4 (2017), pp. 356-366.
- B. G. Eke, Monotonic triads, Discrete Math., Vol. 9, No. 4 (1974), pp. 359-363. MR0354390 (50 #6869)
- Irene Erazo, John López, and Carlos Trujillo, A combinatorial problem that arose in integer B_3 Sets, Revista Colombiana de Matemáticas, Vol. 53, No. 2 (2019), pp. 195-203.
- Juan B. Gil and Jessica A. Tomasko, Pattern-avoiding even and odd Grassmannian permutations, arXiv:2207.12617 [math.CO], 2022.
- John Golden and Marcus Spradlin, Collinear and Soft Limits of Multi-Loop Integrands in N= 4 Yang-Mills, arXiv preprint arXiv:1203.1915 [hep-th], 2012. - From _N. J. A. Sloane_, Sep 14 2012
- Michele Graffeo, Sergej Monavari, Riccardo Moschetti, and Andrea T. Ricolfi, Enumeration of partitions via socle reduction, arXiv:2501.10267 [math.CO], 2025. See p. 40.
- Brian Hopkins and Aram Tangboonduangjit, Water Cells in Compositions of 1s and 2s, arXiv:2412.11528 [math.CO], 2024. See p. 3.
- 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.
- Brian O'Sullivan and Thomas Busch, Spontaneous emission in ultra-cold spin-polarised anisotropic Fermi seas, arXiv 0810.0231v1 [quant-ph], 2008. [Eq 10b, lambda=2]
- Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
- Index entries for sequences related to Lyndon words.
Crossrefs
Programs
-
Haskell
a006918 n = a006918_list !! n a006918_list = scanl (+) 0 a008805_list -- Reinhard Zumkeller, Feb 01 2013
-
Magma
[Floor(Binomial(n+4, 4)/(n+4))-Floor((n+2)/8)*(1+(-1)^n)/2: n in [0..60]]; // Vincenzo Librandi, Nov 10 2014
-
Maple
with(combstruct):ZL:=[st,{st=Prod(left,right),left=Set(U,card=r),right=Set(U,card=r),U=Sequence(Z,card>=3)}, unlabeled]: subs(r=1,stack): seq(count(subs(r=2,ZL),size=m),m=11..58) ; # Zerinvary Lajos, Mar 09 2007 A006918 := proc(n) if type(n,'even') then n*(n+2)*(n+4)/24 ; else binomial(n+3,3)/4 ; fi ; end proc: # R. J. Mathar, May 17 2016
-
Mathematica
f[n_]:=If[EvenQ[n],(n(n+2)(n+4))/24,Binomial[n+3,3]/4]; Join[{0},Array[f,60]] (* Harvey P. Dale, Apr 20 2011 *) durf[ptn_]:=Length[Select[Range[Length[ptn]],ptn[[#]]>=#&]]; Table[Length[Select[IntegerPartitions[n],durf[#]==2&]],{n,0,30}] (* Gus Wiseman, Apr 06 2019 *)
-
PARI
{ parttrees(n)=local(pt,k,nk); if (n%2==0, pt=(n/2+1)^2, pt=ceil(n/2)*(ceil(n/2)+1)); pt+=floor(n/2); for (x=1,floor(n/2),pt+=floor(x/2)+floor((n-x)/2)); if (n%2==0 && n>2, pt-=floor(n/4)); k=1; while (3*k<=n, for (x=k,floor((n-k)/2), pt+=floor(k/2); if (x!=k, pt+=floor(x/2)); if ((n-x-k)!=k && (n-x-k)!=x, pt+=floor((n-x-k)/2))); k++); pt }
-
PARI
{a(n) = n += 2; (n^3 - n * (2-n%2)^2) / 24}; /* Michael Somos, Aug 15 2009 */
Formula
G.f.: x/((1-x)^2*(1-x^2)^2) = x/((1+x)^2*(1-x)^4).
0, 0, 0, 1, 2, 5, 8, 14, ... has a(n) = (Sum_{k=0..n} floor(k(n-k)/2))/2. - Paul Barry, Sep 14 2003
0, 0, 0, 0, 0, 1, 2, 5, 8, 14, 20, 30, 40, 55, ... has a(n) = binomial(floor(1/2 n), 3) + binomial(floor(1/2 n + 1/2), 3) [Eke]. - N. J. A. Sloane, May 12 2012
a(0)=0, a(1)=1, a(n) = (2/(n-1))*a(n-1) + ((n+3)/(n-1))*a(n-2). - Benoit Cloitre, Jun 28 2004
a(n) = floor(binomial(n+4, 4)/(n+4)) - floor((n+2)/8)(1+(-1)^n)/2. - Paul Barry, Jan 01 2005
a(n+1) = a(n) + binomial(floor(n/2)+2,2), i.e., first differences are A008805. Convolution of A008619 with itself, then shifted right (or A004526 with itself, shifted left by 3). - Franklin T. Adams-Watters, Jan 27 2006
Linear recurrence: a(n) = 2a(n-1) + a(n-2) - 4a(n-3) + a(n-4) + 2a(n-5) - a(n-6). - Jaume Oliver Lafont, Dec 05 2008
Euler transform of length 2 sequence [2, 2]. - Michael Somos, Aug 15 2009
a(n) = -a(-4-n) for all n in Z.
a(n+1) + a(n) = A002623(n). - Johannes W. Meijer, May 20 2011
a(n) = (n+2)*(2*n*(n+4)-3*(-1)^n+3)/48. - Bruno Berselli, May 21 2011
G.f.: (1/(1-x)^4-1/(1-x^2)^2)/4. - Herbert Kociemba, Oct 23 2016
E.g.f.: (x*(18 + 9*x + x^2)*cosh(x) + (6 + 15*x + 9*x^2 + x^3)*sinh(x))/24. - Stefano Spezia, Dec 07 2021
From Amiram Eldar, Mar 20 2022: (Start)
Sum_{n>=1} 1/a(n) = 75/4 - 24*log(2).
Sum_{n>=1} (-1)^(n+1)/a(n) = 69/4 - 24*log(2). (End)
Comments