The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A001522 Number of n-stacks with strictly receding walls, or the number of Type A partitions of n in the sense of Auluck (1951). (Formerly M0644 N0238) 24
 1, 1, 1, 1, 2, 3, 5, 7, 10, 14, 19, 26, 35, 47, 62, 82, 107, 139, 179, 230, 293, 372, 470, 591, 740, 924, 1148, 1422, 1756, 2161, 2651, 3244, 3957, 4815, 5844, 7075, 8545, 10299, 12383, 14859, 17794, 21267, 25368, 30207, 35902, 42600, 50462, 59678, 70465, 83079, 97800, 114967, 134956, 158205, 185209, 216546, 252859 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,5 COMMENTS Also number of partitions of n with positive crank (n>=2), cf. A064391. - Vladeta Jovovic, Sep 30 2001 Number of smooth weakly unimodal compositions of n into positive parts such that the first and last part are 1 (smooth means that successive parts differ by at most one), see example. Dropping the requirement for unimodality gives A186085. - Joerg Arndt, Dec 09 2012 Number of weakly unimodal compositions of n where the maximal part m appears at least m times, see example. - Joerg Arndt, Jun 11 2013 Also weakly unimodal compositions of n with first part 1, maximal up-step 1, and no consecutive up-steps; see example. The smooth weakly unimodal compositions are recovered by shifting all rows above the bottom row to the left by one position with respect to the next lower row. - Joerg Arndt, Mar 30 2014 It would seem from Stanley that he regards a(0)=0 for this sequence and A001523. - Michael Somos, Feb 22 2015 From Gus Wiseman, Mar 30 2021: (Start) Also the number of odd-length compositions of n with alternating parts strictly decreasing. These are finite odd-length sequences q of positive integers summing to n such that q(i) > q(i+2) for all possible i. The even-length version is A064428. For example, the a(1) = 1 through a(9) = 14 compositions are:   (1)  (2)  (3)  (4)    (5)    (6)    (7)    (8)    (9)                  (211)  (221)  (231)  (241)  (251)  (261)                         (311)  (312)  (322)  (332)  (342)                                (321)  (331)  (341)  (351)                                (411)  (412)  (413)  (423)                                       (421)  (422)  (432)                                       (511)  (431)  (441)                                              (512)  (513)                                              (521)  (522)                                              (611)  (531)                                                     (612)                                                     (621)                                                     (711)                                                     (32211) (End) REFERENCES G. E. Andrews, The reasonable and unreasonable effectiveness of number theory in statistical mechanics, pp. 21-34 of S. A. Burr, ed., The Unreasonable Effectiveness of Number Theory, Proc. Sympos. Appl. Math., 46 (1992). Amer. Math. Soc. G. E. Andrews, Three-quadrant Ferrers graphs, Indian J. Math., 42 (No. 1, 2000), 1-7. 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 Seiichi Manyama, 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. F. C. Auluck, On some new types of partitions associated with generalized Ferrers graphs (annotated scanned copy) Sergi Elizalde, Symmetric peaks and symmetric valleys in Dyck paths, arXiv:2008.05669 [math.CO], 2020. Erich Friedman, Illustration of initial terms A. D. Sokal, The leading root of the partial theta function, arXiv preprint arXiv:1106.1003 [math.CO], 2011. E. M. Wright, Stacks, III, Quart. J. Math. Oxford, 23 (1972), 153-158. FORMULA a(n) = (A000041(n) - A064410(n)) / 2 for n>=2. G.f.: 1 + ( Sum_{k>=1} -(-1)^k * x^(k*(k+1)/2) ) / ( Product_{k>=1} 1-x^k ). G.f.: 1 + ( Sum_{n>=1} q^(n^2) / ( Product_{k=1..n-1} 1-q^k )^2 * (1-q^n) ) ). - Joerg Arndt, Dec 09 2012 a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*sqrt(3)*n) [Auluck, 1951]. - Vaclav Kotesovec, Sep 26 2016 a(n) = A000041(n) - A064428(n). - Gus Wiseman, Mar 30 2021 EXAMPLE For a(6)=5 we have the following stacks: .x... ..x.. ...x. .xx. xxxxx xxxxx xxxxx xxxx xxxxxx . From Joerg Arndt, Dec 09 2012: (Start) There are a(9) = 14 smooth weakly unimodal compositions of 9: 01:   [ 1 1 1 1 1 1 1 1 1 ] 02:   [ 1 1 1 1 1 1 2 1 ] 03:   [ 1 1 1 1 1 2 1 1 ] 04:   [ 1 1 1 1 2 1 1 1 ] 05:   [ 1 1 1 1 2 2 1 ] 06:   [ 1 1 1 2 1 1 1 1 ] 07:   [ 1 1 1 2 2 1 1 ] 08:   [ 1 1 2 1 1 1 1 1 ] 09:   [ 1 1 2 2 1 1 1 ] 10:   [ 1 1 2 2 2 1 ] 11:   [ 1 2 1 1 1 1 1 1 ] 12:   [ 1 2 2 1 1 1 1 ] 13:   [ 1 2 2 2 1 1 ] 14:   [ 1 2 3 2 1 ] (End) From Joerg Arndt, Jun 11 2013: (Start) There are a(9) = 14 weakly unimodal compositions of 9 where the maximal part m appears at least m times: 01:  [ 1 1 1 1 1 1 1 1 1 ] 02:  [ 1 1 1 1 1 2 2 ] 03:  [ 1 1 1 1 2 2 1 ] 04:  [ 1 1 1 2 2 1 1 ] 05:  [ 1 1 1 2 2 2 ] 06:  [ 1 1 2 2 1 1 1 ] 07:  [ 1 1 2 2 2 1 ] 08:  [ 1 2 2 1 1 1 1 ] 09:  [ 1 2 2 2 1 1 ] 10:  [ 1 2 2 2 2 ] 11:  [ 2 2 1 1 1 1 1 ] 12:  [ 2 2 2 1 1 1 ] 13:  [ 2 2 2 2 1 ] 14:  [ 3 3 3 ] (End) From Joerg Arndt, Mar 30 2014: (Start) There are a(9) = 14 compositions of 9 with first part 1, maximal up-step 1, and no consecutive up-steps: 01:  [ 1 1 1 1 1 1 1 1 1 ] 02:  [ 1 1 1 1 1 1 1 2 ] 03:  [ 1 1 1 1 1 1 2 1 ] 04:  [ 1 1 1 1 1 2 1 1 ] 05:  [ 1 1 1 1 1 2 2 ] 06:  [ 1 1 1 1 2 1 1 1 ] 07:  [ 1 1 1 1 2 2 1 ] 08:  [ 1 1 1 2 1 1 1 1 ] 09:  [ 1 1 1 2 2 1 1 ] 10:  [ 1 1 1 2 2 2 ] 11:  [ 1 1 2 1 1 1 1 1 ] 12:  [ 1 1 2 2 1 1 1 ] 13:  [ 1 1 2 2 2 1 ] 14:  [ 1 1 2 2 3 ] (End) G.f. = 1 + x + x^2 + x^3 + 2*x^4 + 3*x^5 + 5*x^6 + 7*x^7 + 10*x^8 + 14*x^9 + ... MAPLE b:= proc(n, i, t) option remember; `if`(n<=0, `if`(i=1, 1, 0),       `if`(n<0 or i<1, 0, b(n-i, i, t)+b(n-(i-1), i-1, false)+       `if`(t, b(n-(i+1), i+1, t), 0)))     end: a:= n-> b(n-1, 1, true): seq(a(n), n=0..70);  # Alois P. Heinz, Feb 26 2014 # second Maple program: A001522 := proc(n)     local r, a;     a := 0 ;     if n = 0 then         return 1 ;     end if;     for r from 1 do         if r*(r+1) > 2*n then             return a;         else             a := a-(-1)^r*combinat[numbpart](n-r*(r+1)/2) ;         end if;     end do: end proc: # R. J. Mathar, Mar 07 2015 MATHEMATICA max = 50; f[x_] := 1 + Sum[-(-1)^k*x^(k*(k+1)/2), {k, 1, max}] / Product[(1-x^k), {k, 1, max}]; CoefficientList[ Series[ f[x], {x, 0, max}], x] (* Jean-François Alcover, Dec 27 2011, after g.f. *) b[n_, i_, t_] := b[n, i, t] = If[n <= 0, If[i == 1, 1, 0], If[n<0 || i<1, 0, b[n-i, i, t] + b[n - (i-1), i-1, False] + If[t, b[n - (i+1), i+1, t], 0]]]; a[n_] := b[n-1, 1, True]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Dec 01 2015, after Alois P. Heinz *) Flatten[{1, Table[Sum[(-1)^(j-1)*PartitionsP[n-j*((j+1)/2)], {j, 1, Floor[(Sqrt[8*n + 1] - 1)/2]}], {n, 1, 60}]}] (* Vaclav Kotesovec, Sep 26 2016 *) ici[q_]:=And@@Table[q[[i]]>q[[i+2]], {i, Length[q]-2}]; Table[If[n==0, 1, Length[Select[Join@@Permutations/@Select[IntegerPartitions[n], OddQ@*Length], ici]]], {n, 0, 15}] (* Gus Wiseman, Mar 30 2021 *) PROG (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)), n))}; /* Michael Somos, Jul 22 2003 */ (PARI) N=66; q='q+O('q^N); Vec( 1 + sum(n=1, N, q^(n^2)/(prod(k=1, n-1, 1-q^k)^2*(1-q^n)) ) ) \\ Joerg Arndt, Dec 09 2012 (Sage) def A001522(n):     if n < 4: return 1     return (number_of_partitions(n) - [p.crank() for p in Partitions(n)].count(0))/2 [A001522(n) for n in range(30)]  # Peter Luschny, Sep 15 2014 CROSSREFS Cf. A000041, A059776, A001523, A001524. A003242 counts anti-run compositions. A027193 counts odd-length compositions. A034008 counts even-length compositions. A062968 counts odd-length compositions with alternating parts equal. A064391 counts partitions by crank. A064410 counts partitions of crank 0. A065608 counts even-length compositions with alternating parts equal. A257989 gives the crank of the partition with Heinz number n. A342527 counts compositions with alternating parts equal. A342528 counts compositions with alternating parts weakly decreasing. Cf. A000009, A000726, A008965, A059966, A064428, A114921, A175342, A342532. Sequence in context: A280277 A102108 A105780 * A054405 A155167 A325858 Adjacent sequences:  A001519 A001520 A001521 * A001523 A001524 A001525 KEYWORD nonn,easy,nice AUTHOR EXTENSIONS a(0) changed from 0 to 1 by Joerg Arndt, Mar 30 2014 Edited definition. - N. J. A. Sloane, Mar 31 2021 STATUS approved

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

Last modified April 23 05:42 EDT 2021. Contains 343199 sequences. (Running on oeis4.)