A001523 Number of stacks, or planar partitions of n; also weakly unimodal compositions of n.
1, 1, 2, 4, 8, 15, 27, 47, 79, 130, 209, 330, 512, 784, 1183, 1765, 2604, 3804, 5504, 7898, 11240, 15880, 22277, 31048, 43003, 59220, 81098, 110484, 149769, 202070, 271404, 362974, 483439, 641368, 847681, 1116325, 1464999, 1916184, 2498258, 3247088, 4207764
Offset: 0
Examples
For a(4)=8 we have the following stacks: x x x. .x x x. .x x.. .x. ..x xx x xx xx xxx xxx xxx xx xxxx G.f. = 1 + x + 2*x^2 + 4*x^3 + 8*x^4 + 15*x^5 + 27*x^6 + 47*x^7 + 79*x^8 + ... From _Gus Wiseman_, Mar 04 2020: (Start) The a(1) = 1 through a(5) = 15 unimodal compositions: (1) (2) (3) (4) (5) (11) (12) (13) (14) (21) (22) (23) (111) (31) (32) (112) (41) (121) (113) (211) (122) (1111) (131) (221) (311) (1112) (1121) (1211) (2111) (11111) (End)
References
- 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).
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 1999; see section 2.5 on page 76.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000 (first 1001 terms from T. D. Noe)
- F. C. Auluck, On some new types of partitions associated with generalized Ferrers graphs, Proc. Cambridge Philos. Soc. 47, (1951), 679-686, g(x).
- F. C. Auluck, On some new types of partitions associated with generalized Ferrers graphs (annotated scanned copy)
- H. Bottomley, Illustration of initial terms
- Shouvik Datta, Matthias R. Gaberdiel, Wei Li, and Cheng Peng, Twisted sectors from plane partitions, arXiv preprint arXiv:1606.07070 [hep-th], 2016. See Sect. 2.1.
- Sergi Elizalde, Symmetric peaks and symmetric valleys in Dyck paths, arXiv:2008.05669 [math.CO], 2020.
- Sergi Elizalde and Emeric Deutsch, The degree of asymmetry of a sequence, Enum. Combinat. Applic. 2 (2022) no 1 #S2R7, U(1,z).
- Philippe Flajolet and Robert Sedgewick, Analytic Combinatorics, 2009; see page 46.
- Rigoberto Flórez, José L. Ramírez, and Diego Villamizar, Restricted bargraphs and unimodal compositions, J. Comb. Theory, Series A, (2024) Vol. 208, Art. No. 105934.
- R. C. Rhoades, Strongly Unimodal Sequences and Mixed Mock Modular Forms
- Alan D. Sokal, The leading root of the partial theta function, arXiv preprint arXiv:1106.1003 [math.CO], 2011.
- Eric Weisstein's World of Mathematics, Unimodal Sequence
- E. M. Wright, Stacks, III, Quart. J. Math. Oxford, 23 (1972), 153-158.
Crossrefs
Row sums of A247255.
Row sums of A072704.
The strict case is A072706.
The complement is counted by A115981.
The case covering an initial interval is A227038.
The version whose negation is unimodal as well appears to be A329398.
Unimodal sequences covering an initial interval are A007052.
Non-unimodal permutations are A059204.
Non-unimodal sequences covering an initial interval are A328509.
Partitions with unimodal run-lengths are A332280.
Numbers whose prime signature is not unimodal are A332282.
Partitions whose 0-appended first differences are unimodal are A332283.
The number of unimodal permutations of the prime indices of n is A332288.
Compositions whose negation is unimodal are A332578.
Compositions whose run-lengths are unimodal are A332726.
Programs
-
Magma
m:=100; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!( 1 + (&+[ x^n*(1-x^n)/(&*[(1-x^j)^2: j in [1..n]]): n in [1..m+2]]) )); // G. C. Greubel, Apr 03 2023 -
Maple
b:= proc(n, i) option remember; `if`(i>n, 0, `if`(irem(n, i)=0, 1, 0)+ add(b(n-i*j, i+1)*(j+1), j=0..n/i)) end: a:= n-> `if`(n=0, 1, b(n, 1)): seq(a(n), n=0..60); # Alois P. Heinz, Mar 26 2014
-
Mathematica
max = 40; s = 1 + Sum[(-1)^(k + 1)*q^(k*(k + 1)/2), {k, 1, max}] / QPochhammer[q]^2 + O[q]^max; CoefficientList[s, q] (* Jean-François Alcover, Jan 25 2012, updated Nov 29 2015 *) b[n_, i_] := b[n, i] = If[i>n, 0, If[Mod[n, i]==0, 1, 0] + Sum[b[n-i*j, i+1]*(j+1), {j, 0, n/i}]]; a[n_] := If[n==0, 1, b[n, 1]]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Nov 24 2015, after Alois P. Heinz *) unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]]; Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],unimodQ[#]&]],{n,0,10}] (* Gus Wiseman, Mar 04 2020 *)
-
PARI
{a(n) = if( n<1, n==0, polcoeff( sum(k=1, (sqrt(1 + 8*n) - 1)\2, -(-1)^k * x^((k + k^2)/2)) / eta(x + x * O(x^n))^2 ,n))}; /* Michael Somos, Jul 22 2003 */
-
Python
def b(n, i): if i>n: return 0 if n%i==0: x=1 else: x=0 return x + sum([b(n - i*j, i + 1)*(j + 1) for j in range(n//i + 1)]) def a(n): return 1 if n==0 else b(n, 1) # Indranil Ghosh, Jun 09 2017, after Maple code by Alois P. Heinz
Formula
a(n) = Sum_{k=1..n} f(k, n-k), where f(n, k) (= A054250) = 1 if k = 0; Sum_{j=1..min(n, k)} (n-j+1)*f(j, k-j) if k > 0. - David W. Wilson, May 05 2000
a(n) = Sum_{k} A059623(n, k) for n > 0. - Henry Bottomley, Feb 01 2001
G.f.: 1 + (Sum_{k>0} -(-1)^k x^(k(k+1)/2))/(Product_{k>0} (1-x^k))^2. - Michael Somos, Jul 22 2003
G.f.: 1 + Sum_{n>=1} (x^n / ( ( Product_{k=1..n-1} (1 - x^k)^2 ) * (1-x^n) ) ). - Joerg Arndt, Oct 01 2012
a(n) ~ exp(2*Pi*sqrt(n/3)) / (8 * 3^(3/4) * n^(5/4)) [Auluck, 1951]. - Vaclav Kotesovec, Jun 22 2015
a(n) + A115981(n) = 2^(n - 1). - Gus Wiseman, Mar 04 2020
Extensions
More terms from David W. Wilson, May 05 2000
Definition corrected by Wolfdieter Lang, Dec 05 2018
Comments