login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A034296 Number of flat partitions of n: partitions {a_i} with each |a_i - a_{i-1}| <= 1. 71

%I #122 Dec 18 2023 12:07:54

%S 1,1,2,3,4,5,7,8,10,13,15,18,23,26,31,39,44,52,63,72,85,101,115,134,

%T 158,181,208,243,277,318,369,418,478,549,622,710,809,914,1036,1177,

%U 1328,1498,1695,1904,2143,2416,2706,3036,3408,3811,4264,4769,5319,5934,6621

%N Number of flat partitions of n: partitions {a_i} with each |a_i - a_{i-1}| <= 1.

%C Also number of partitions of n such that all parts, with the possible exception of the largest, appear only once. Example: a(6)=7 because we have [6], [5,1], [4,2], [3,3], [3,2,1], [2,2,2] and [1,1,1,1,1,1] ([4,1,1], [3,1,1,1], [2,2,1,1], [2,1,1,1,1,1] do not qualify). - _Emeric Deutsch_ and _Vladeta Jovovic_, Feb 23 2006

%C Also the number of partitions p of n such that d(p) > max(p) - min(p), where d is the number of distinct parts of p; indeed that inequality occurs only when d(p) = 1+ max(p) - min(p), so p satisfies a(i) - a(i-1) = 1 for all parts, ordered as a(i) >= a(i-1) > ... > a(k). - _Clark Kimberling_, Apr 18 2014

%C Flat partitions are also called gap-free partitions. See, for example, the Grabner et al. reference. - _Emeric Deutsch_, Sep 22 2016

%C Conjecture: Also the sum of the smallest parts in the distinct partitions of n with an odd number of parts. - _George Beck_, May 06 2017

%C Above conjecture was proved by Shane Chern, see link. - _George Beck_, Aug 12 2017

%C Note that Andrews [2016] uses a(0) = 1. - _Michael Somos_, Aug 07 2017

%C Also called number of compact partitions of n where a compact partition is one where every integer between the largest and smallest parts of it also appears as a part. [Andrews 2016] - _Michael Somos_, Aug 13 2017

%H Alois P. Heinz, <a href="/A034296/b034296.txt">Table of n, a(n) for n = 0..10000</a>

%H George E. Andrews, <a href="https://georgeandrews1.github.io/pdf/320.pdf">The Bhargava-Adiga Summation and Partitions</a>, 2016; See page 4 equation (2.1).

%H Shane Chern, <a href="https://arxiv.org/abs/1705.10700">On a conjecture of George Beck</a>, arXiv:1705.10700 [math.NT], 2017.

%H P. J. Grabner, A. Knopfmacher, <a href="https://www.math.tugraz.at/fosp/pdfs/tugraz_0087.pdf">Analysis of some new partition statistics</a>, Ramanujan J., 12, 2006, 439-454.

%H Jia Huang, <a href="https://arxiv.org/abs/1812.11010">Compositions with restricted parts</a>, arXiv:1812.11010 [math.CO], 2018. Also Discrete Masth., 343 (2020), # 111875.

%H Jane Y. X. Yang, <a href="https://arxiv.org/abs/1801.06815">Combinatorial proofs and generalizations on conjectures related with Euler's partition theorem</a>, arXiv:1801.06815 [math.CO], 2018.

%F G.f.: x/(1-x) + x^2/(1-x^2)*(1+x) + x^3/(1-x^3)*(1+x)*(1+x^2) + x^4/(1-x^4)*(1+x)*(1+x^2)*(1+x^3) + x^5/(1-x^5)*(1+x)*(1+x^2)*(1+x^3)*(1+x^4) + ... . - _Emeric Deutsch_ and _Vladeta Jovovic_, Feb 22 2006

%F a(n) = Sum_{k=0..1} A238353(n,k). - _Alois P. Heinz_, Mar 09 2014

%F a(n) ~ exp(Pi*sqrt(n/3)) / (4*3^(1/4)*n^(3/4)). - _Vaclav Kotesovec_, May 24 2018

%e From _Joerg Arndt_, Dec 27 2012: (Start)

%e The a(11)=18 flat partitions of 11 are (in lexicographic order)

%e [ 1] [ 1 1 1 1 1 1 1 1 1 1 1 ]

%e [ 2] [ 2 1 1 1 1 1 1 1 1 1 ]

%e [ 3] [ 2 2 1 1 1 1 1 1 1 ]

%e [ 4] [ 2 2 2 1 1 1 1 1 ]

%e [ 5] [ 2 2 2 2 1 1 1 ]

%e [ 6] [ 2 2 2 2 2 1 ]

%e [ 7] [ 3 2 1 1 1 1 1 1 ]

%e [ 8] [ 3 2 2 1 1 1 1 ]

%e [ 9] [ 3 2 2 2 1 1 ]

%e [10] [ 3 2 2 2 2 ]

%e [11] [ 3 3 2 1 1 1 ]

%e [12] [ 3 3 2 2 1 ]

%e [13] [ 3 3 3 2 ]

%e [14] [ 4 3 2 1 1 ]

%e [15] [ 4 3 2 2 ]

%e [16] [ 4 4 3 ]

%e [17] [ 6 5 ]

%e [18] [ 11 ]

%e The a(11)=18 partitions of 11 where no part (except possibly the largest) is repeated are

%e [ 1] [ 1 1 1 1 1 1 1 1 1 1 1 ]

%e [ 2] [ 2 2 2 2 2 1 ]

%e [ 3] [ 3 3 3 2 ]

%e [ 4] [ 4 4 2 1 ]

%e [ 5] [ 4 4 3 ]

%e [ 6] [ 5 3 2 1 ]

%e [ 7] [ 5 4 2 ]

%e [ 8] [ 5 5 1 ]

%e [ 9] [ 6 3 2 ]

%e [10] [ 6 4 1 ]

%e [11] [ 6 5 ]

%e [12] [ 7 3 1 ]

%e [13] [ 7 4 ]

%e [14] [ 8 2 1 ]

%e [15] [ 8 3 ]

%e [16] [ 9 2 ]

%e [17] [ 10 1 ]

%e [18] [ 11 ]

%e (End)

%p g:= 1+sum(x^j*product(1+x^i, i=1..j-1)/(1-x^j), j=1..60): gser:=series(g, x=0, 55): seq(coeff(gser, x, n), n=0..50); # _Emeric Deutsch_, Feb 23 2006

%p # second Maple program:

%p b:= proc(n, i) option remember;

%p `if`(n=0, 1, `if`(i<1, 0, add(b(n-i*j, i-1), j=1..n/i)))

%p end:

%p a:= n-> add(b(n, k), k=0..n):

%p seq(a(n), n=0..70); # _Alois P. Heinz_, Jul 06 2012

%t nn=54;Drop[CoefficientList[Series[Sum[x^i/(1-x^i)Product[1+x^j,{j,1,i-1}],{i,1,nn}],{x,0,nn}],x],1] (* _Geoffrey Critzer_, Sep 28 2013 *)

%t b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, Sum[b[n-i*j, i-1], {j, 1, n/i}]]]; a[n_] := Sum[b[n, k], {k, 1, n}]; Table[a[n], {n, 1, 70}] (* _Jean-François Alcover_, Mar 24 2015, after _Alois P. Heinz_ *)

%t a[ n_] := SeriesCoefficient[ Sum[ x^k / (1 - x^k) QPochhammer[ -x, x, k - 1] // FunctionExpand, {k, n}], {x, 0, n}]; (* _Michael Somos_, Aug 07 2017 *)

%o (PARI)

%o N = 66; x = 'x + O('x^N);

%o gf = sum(n=1,N, x^n/(1-x^n) * prod(k=1,n-1,1+x^k) );

%o v = Vec(gf)

%o /* _Joerg Arndt_, Apr 21 2013 */

%o (PARI) {a(n) = my(t); if( n<1, 0, polcoeff(sum(k=1, n, (t *= 1 + x^k) * x^k / (1 - x^(2*k)), t = 1 + x * O(x^n)), n))}; /* _Michael Somos_, Aug 07 2017 */

%o (PARI) {a(n) = my(c); forpart(p=n, c++; for(i=1, #p-1, if( p[i+1] > p[i] + 1, c--; break))); c}; /* _Michael Somos_, Aug 13 2017 */

%o (Python)

%o from sympy.core.cache import cacheit

%o @cacheit

%o def b(n, i): return 1 if n==0 else 0 if i<1 else sum(b(n - i*j, i - 1) for j in range(1, n//i + 1))

%o def a(n): return sum(b(n, k) for k in range(n + 1))

%o print([a(n) for n in range(71)]) # _Indranil Ghosh_, Aug 14 2017, after Maple code by _Alois P. Heinz_

%Y Cf. A034297, A239954, A092265.

%Y Sequences "number of partitions with max diff d": A000005 (d=0, for n>=1), this sequence (d=1), A224956 (d=2), A238863 (d=3), A238864 (d=4), A238865 (d=5), A238866 (d=6), A238867 (d=7), A238868 (d=8), A238869 (d=9), A000041 (d --> infinity).

%K nonn

%O 0,3

%A _Erich Friedman_

%E More terms from _Emeric Deutsch_, Feb 23 2006

%E a(0)=1 prepended by _Alois P. Heinz_, Aug 14 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)