A072706 Number of unimodal partitions/compositions of n into distinct terms.
1, 1, 1, 3, 3, 5, 9, 11, 15, 21, 33, 39, 55, 69, 93, 127, 159, 201, 261, 327, 411, 537, 653, 819, 1011, 1257, 1529, 1899, 2331, 2829, 3441, 4179, 5031, 6093, 7305, 8767, 10575, 12573, 14997, 17847, 21223, 25089, 29757, 35055, 41379, 48801, 57285, 67131
Offset: 0
Keywords
Examples
a(6)=9 since 6 can be written as 1+2+3, 1+3+2, 1+5, 2+3+1, 2+4, 3+2+1, 4+2, 5+1, or 6, but not for example 1+4+1 (which does not have distinct terms) nor 2+1+3 (which is not unimodal). From _Joerg Arndt_, Mar 25 2014: (Start) The a(10) = 33 such compositions of 10 are: 01: [ 1 2 3 4 ] 02: [ 1 2 4 3 ] 03: [ 1 2 7 ] 04: [ 1 3 4 2 ] 05: [ 1 3 6 ] 06: [ 1 4 3 2 ] 07: [ 1 4 5 ] 08: [ 1 5 4 ] 09: [ 1 6 3 ] 10: [ 1 7 2 ] 11: [ 1 9 ] 12: [ 2 3 4 1 ] 13: [ 2 3 5 ] 14: [ 2 4 3 1 ] 15: [ 2 5 3 ] 16: [ 2 7 1 ] 17: [ 2 8 ] 18: [ 3 4 2 1 ] 19: [ 3 5 2 ] 20: [ 3 6 1 ] 21: [ 3 7 ] 22: [ 4 3 2 1 ] 23: [ 4 5 1 ] 24: [ 4 6 ] 25: [ 5 3 2 ] 26: [ 5 4 1 ] 27: [ 6 3 1 ] 28: [ 6 4 ] 29: [ 7 2 1 ] 30: [ 7 3 ] 31: [ 8 2 ] 32: [ 9 1 ] 33: [ 10 ] (End)
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Crossrefs
Programs
-
Maple
b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0, `if`(n=0, 1, expand(b(n, i-1) +`if`(i>n, 0, x*b(n-i, i-1))))) end: a:= n->(p->add(coeff(p, x, i)*ceil(2^(i-1)), i=0..degree(p)))(b(n$2)): seq(a(n), n=0..100); # Alois P. Heinz, Mar 25 2014
-
Mathematica
b[n_, i_] := b[n, i] = If[n > i*(i + 1)/2, 0, If[n == 0, 1, Expand[b[n, i - 1] + If[i > n, 0, x*b[n - i, i - 1]]]]]; a[n_] := Function[{p}, Sum[Coefficient[p, x, i]*Ceiling[2^(i - 1)], {i, 0, Exponent[p, x]}]][b[n, n]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jan 16 2015, after Alois P. Heinz *) Table[If[n==0,1,Sum[2^(Length[ptn]-1),{ptn,Select[IntegerPartitions[n],UnsameQ@@#&]}]],{n,0,15}] (* Gus Wiseman, Dec 31 2019 *)
-
PARI
N=66; q='q+O('q^N); Vec( 1 + sum(n=1, N, 2^(n-1)*q^(n*(n+1)/2) / prod(k=1, n, 1-q^k ) ) ) \\ Joerg Arndt, Mar 25 2014
Formula
G.f.: 1/2*(1+Product_{k>0} (1+2*x^k)). - Vladeta Jovovic, Jun 24 2003
G.f.: 1 + sum(n>=1, 2^(n-1)*q^(n*(n+1)/2) / prod(k=1..n, 1-q^k ) ). [Joerg Arndt, Jan 20 2014]
a(n) ~ c^(1/4) * exp(2*sqrt(c*n)) / (4*sqrt(3*Pi)*n^(3/4)), where c = -polylog(2, -2) = A266576 = 1.436746366883680946362902023893583354... - Vaclav Kotesovec, Sep 22 2019
Comments