cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 15 results. Next

A001523 Number of stacks, or planar partitions of n; also weakly unimodal compositions of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) counts stacks of integer-length boards of total length n where no board overhangs the board underneath.
Number of graphical partitions on 2n nodes that contain a 1. E.g. a(3)=4 and so there are 4 graphical partitions of 6 that contain a 1, namely (111111), (21111), (2211) and (3111). Only (222) fails. - Jon Perry, Jul 25 2003
It would seem from Stanley that he regards a(0)=0 for this sequence and A001522. - Michael Somos, Feb 22 2015
In the article by Auluck is a typo in the formula (24), 2*Pi is missing in an exponent on the left side of the equation for Q(n). The correct term is exp(2*Pi*sqrt(n/3)), not just exp(sqrt(n/3)). - Vaclav Kotesovec, Jun 22 2015

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.

Crossrefs

Cf. A000569. Bisections give A100505, A100506.
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
A006330(n) + a(n) = A000712(n). - Michael Somos, Jul 22 2003
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

A005169 Number of fountains of n coins.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 9, 15, 26, 45, 78, 135, 234, 406, 704, 1222, 2120, 3679, 6385, 11081, 19232, 33379, 57933, 100550, 174519, 302903, 525734, 912493, 1583775, 2748893, 4771144, 8281088, 14373165, 24946955, 43299485, 75153286, 130440740, 226401112, 392955956, 682038999, 1183789679, 2054659669, 3566196321, 6189714276
Offset: 0

Views

Author

Keywords

Comments

A fountain is formed by starting with a row of coins, then stacking additional coins on top so that each new coin touches two in the previous row.
Also the number of Dyck paths for which the sum of the heights of the vertices that terminate an upstep (i.e., peaks and doublerises) is n. Example: a(4)=3 because we have UDUUDD, UUDDUD and UDUDUDUD. - Emeric Deutsch, Mar 22 2008
Also the number of ordered trees with path length n (follows from previous comment via a standard bijection). - Emeric Deutsch, Mar 22 2008
Probably first studied by Jim Propp (unpublished).
Number of compositions of n with c(1) = 1 and c(i+1) <= c(i) + 1. (Slide each row right 1/2 step relative to the row below, and count the columns.) - Franklin T. Adams-Watters, Nov 24 2009
With the additional requirement for weak unimodality one obtains A001524. - Joerg Arndt, Dec 09 2012

Examples

			An example of a fountain with 19 coins:
... O . O O
.. O O O O O O . O
. O O O O O O O O O
From _Peter Bala_, Dec 26 2012: (Start)
F(1/10) = Sum_{n >= 0} a(n)/10^n has the simple continued fraction expansion 1 + 1/(8 + 1/(1 + 1/(8 + 1/(1 + 1/(98 + 1/(1 + 1/(98 + 1/(1 + 1/(998 + 1/(1 + 1/(998 + 1/(1 + ...)))))))))))).
F(-1/10) = Sum_{n >= 0} (-1)^n*a(n)/10^n has the simple continued fraction expansion 1/(1 + 1/(9 + 1/(1 + 1/(9 + 1/(99 + 1/(1 + 1/(99 + 1/(999 + 1/(1 + 1/(999 + 1/(9999 + 1/(1 + ...)))))))))))).
(End)
		

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, p. 381.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001524, A192728, A192729, A192730, A111317, A143951, A285903, A226999 (inverse Euler transform), A291148 (convolution inverse).
First column of A168396. - Franklin T. Adams-Watters, Nov 24 2009
Diagonal of A185646.
Row sums of A047998. Column sums of A138158. - Emeric Deutsch, Mar 22 2008

Programs

  • Haskell
    a005169 0 = 1
    a005169 n = a168396 n 1  -- Reinhard Zumkeller, Sep 13 2013; corrected by R. J. Mathar, Sep 16 2013
  • Maple
    P[0]:=1: for n to 40 do P[n]:=sort(expand(t*(sum(P[j]*P[n-j-1]*t^(n-j-1),j= 0..n-1)))) end do: F:=sort(sum(P[k],k=0..40)): seq(coeff(F,t,j),j=0..36); # Emeric Deutsch, Mar 22 2008
    # second Maple program:
    A005169_G:= proc(x,NK); Digits:=250; Q2:=1;
            for k from NK by -1 to 0 do  Q1:=1-x^k/Q2; Q2:=Q1; od;
            Q3:=Q2; S:=1-Q3;
    end:
    series(A005169_G(x, 20), x, 21); # Sergei N. Gladkovskii, Dec 18 2011
  • Mathematica
    m = 36; p[0] = 1; p[n_] := p[n] = Expand[t*Sum[p[j]*p[n-j-1]*t^(n-j-1), {j, 0, n-1}]]; f[t_] = Sum[p[k], {k, 0, m}]; CoefficientList[Series[f[t], {t, 0, m}], t] (* Jean-François Alcover, Jun 21 2011, after Emeric Deutsch *)
    max = 43; Series[1-Fold[Function[1-x^#2/#1], 1, Range[max, 0, -1]], {x, 0, max}] // CoefficientList[#, x]& (* Jean-François Alcover, Sep 16 2014 *)
    b[n_, i_] := b[n, i] = If[n==0, 1, Sum[b[n-j, j], {j, 1, Min[i+1, n]}]];
    c[n_] :=  b[n, 0] - b[n-1, 0];
    c /@ Range[0, 50] // Accumulate  (* Jean-François Alcover, Nov 14 2020, after Alois P. Heinz in A289080 *)
  • PARI
    /* using the g.f. from p. L1278 of the Glasser, Privman, Svrakic paper */
    N=30;  x='x+O('x^N);
    P(k)=sum(n=0,N, (-1)^n*x^(n*(n+1+k))/prod(j=1,n,1-x^j));
    G=1+x*P(1)/( (1-x)*P(1)-x^2*P(2) );
    Vec(G) /* Joerg Arndt, Feb 10 2011 */
    
  • PARI
    /* As a continued fraction: */
    {a(n)=local(A=1+x,CF);CF=1+x;for(k=0,n,CF=1/(1-x^(n-k+1)*CF+x*O(x^n));A=CF);polcoeff(A,n)} /* Paul D. Hanna */
    
  • PARI
    /* By the Rogers-Ramanujan continued fraction identity: */
    {a(n)=local(A=1+x,P,Q);
    P=sum(m=0,sqrtint(n),(-1)^m*x^(m*(m+1))/prod(k=1,m,1-x^k));
    Q=sum(m=0,sqrtint(n),(-1)^m*x^(m^2)/prod(k=1,m,1-x^k));
    A=P/(Q+x*O(x^n));polcoeff(A,n)}  /* Paul D. Hanna */
    

Formula

A005169(n) = f(n, 1), where f(n, p) = 0 if p > n, 1 if p = n, Sum(1 <= q <= p+1; f(n-p, q)) if p < n. f=A168396.
G.f.: F(t) = Sum_{k>=0} P[k], where P[0]=1, P[n] = t*Sum_{j= 0..n-1} P[j]*P[n-j-1]*t^(n-j-1) for n >= 1. - Emeric Deutsch, Mar 22 2008
G.f.: 1/(1-x/(1-x^2/(1-x^3/(1-x^4/(1-x^5/(...)))))) [given on the first page of the Odlyzko/Wilf reference]. - Joerg Arndt, Mar 08 2011
G.f.: 1/G(0), where G(k)= 1 - x^(k+1)/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Jun 29 2013
G.f.: A(x) = P(x)/Q(x) where
P(x) = Sum_{n>=0} (-1)^n* x^(n*(n+1)) / Product_{k=1..n} (1-x^k),
Q(x) = Sum_{n>=0} (-1)^n* x^(n^2) / Product_{k=1..n} (1-x^k),
due to the Rogers-Ramanujan continued fraction identity. - Paul D. Hanna, Jul 08 2011
From Peter Bala, Dec 26 2012: (Start)
Let F(x) denote the o.g.f. of this sequence. For positive integer n >= 3, the real number F(1/n) has the simple continued fraction expansion 1 + 1/(n-2 + 1/(1 + 1/(n-2 + 1/(1 + 1/(n^2-2 + 1/(1 + 1/(n^2-2 + 1/(1 + ...)))))))), while for n >= 2, F(-1/n) has the simple continued fraction expansion 1/(1 + 1/(n-1 + 1/(1 + 1/(n-1 + 1/(n^2-1 + 1/(1 + 1/(n^2-1 + 1/(n^3-1 + 1/(1 + ...))))))))). Examples are given below. Cf. A111317 and A143951.
(End)
a(n) = c * x^(-n) + O((5/3)^n), where c = 0.312363324596741... and x = A347901 = 0.576148769142756... is the lowest root of the equation Q(x) = 0, Q(x) see above (Odlyzko & Wilf 1988). - Vaclav Kotesovec, Jul 18 2013, updated Sep 24 2020
G.f.: G(0), where G(k)= 1 - x^(k+1)/(x^(k+1) - 1/G(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Aug 06 2013
G.f.: 1 - 1/x + 1/(x*W(0)), where W(k)= 1 - x^(2*k+2)/(1 - x^(2*k+1)/W(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Aug 16 2013

Extensions

More terms from David W. Wilson, Apr 30 2001

A001522 Number of n-stacks with strictly receding walls, or the number of Type A partitions of n in the sense of Auluck (1951).

Original entry on oeis.org

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
Offset: 0

Views

Author

Keywords

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)
In the Ferrers diagram of a partition x of n, count the dots in each diagonal parallel to the main diagonal (starting at the top-right, say). The result diag(x) is a smooth weakly unimodal composition of n into positive parts such that the first and last part are 1. For example, diag(5541) = 11233221. The function diag is many-to-one; the size of its codomain as a set is a(n). If diag(x) = diag(y), each hook of x can be slid by the same amount past the main diagonal to get y. For example, diag(5541) = diag(44331). - George Beck, Sep 26 2021
From Gus Wiseman, May 23 2022: (Start)
Conjecture: Also the number of integer partitions y of n with a fixed point y(i) = i. These partitions are ranked by A352827. The conjecture is stated at A238395, but Resta tells me he may not have had a proof. The a(1) = 1 through a(8) = 10 partitions are:
(1) (11) (111) (22) (32) (42) (52) (62)
(1111) (221) (222) (322) (422)
(11111) (321) (421) (521)
(2211) (2221) (2222)
(111111) (3211) (3221)
(22111) (4211)
(1111111) (22211)
(32111)
(221111)
(11111111)
Note that these are not the same partitions (compare A352827 to A352874), only the same count (apparently).
(End)
The above conjecture is true. See Section 4 of the Blecher-Knopfmacher paper in the Links section. - Jeremy Lovejoy, Sep 26 2022

Examples

			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 + ...
		

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.

Crossrefs

A version for permutations is A002467, complement A000166.
The case of zero crank is A064410, ranked by A342192.
The case of nonnegative crank is A064428, ranked by A352873.
A strict version is A352829, complement A352828.
Conjectured to be column k = 1 of A352833.
These partitions (positive crank) are ranked by A352874.
A000700 counts self-conjugate partitions, ranked by A088902.
A064391 counts partitions by crank.
A115720 and A115994 count partitions by their Durfee square.
A257989 gives the crank of the partition with Heinz number n.
Counting compositions: A003242, A114921, A238351, A342527, A342528, A342532.
Fixed points of reversed partitions: A238352, A238394, A238395, A352822, A352830, A352872.

Programs

  • 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 *)
  • 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

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
a(n) = A064428(n) - A064410(n). - Gus Wiseman, May 23 2022

Extensions

a(0) changed from 0 to 1 by Joerg Arndt, Mar 30 2014
Edited definition. - N. J. A. Sloane, Mar 31 2021

A227038 Number of (weakly) unimodal compositions of n where all parts 1, 2, ..., m appear where m is the largest part.

Original entry on oeis.org

1, 1, 1, 3, 4, 7, 13, 19, 30, 44, 71, 98, 147, 205, 294, 412, 575, 783, 1077, 1456, 1957, 2634, 3492, 4627, 6082, 7980, 10374, 13498, 17430, 22451, 28767, 36806, 46803, 59467, 75172, 94839, 119285, 149599, 187031, 233355, 290340, 360327, 446222, 551251, 679524, 835964, 1026210
Offset: 0

Views

Author

Joerg Arndt, Jun 28 2013

Keywords

Examples

			There are a(8) = 30 such compositions of 8:
01:  [ 1 1 1 1 1 1 1 1 ]
02:  [ 1 1 1 1 1 1 2 ]
03:  [ 1 1 1 1 1 2 1 ]
04:  [ 1 1 1 1 2 1 1 ]
05:  [ 1 1 1 1 2 2 ]
06:  [ 1 1 1 2 1 1 1 ]
07:  [ 1 1 1 2 2 1 ]
08:  [ 1 1 1 2 3 ]
09:  [ 1 1 1 3 2 ]
10:  [ 1 1 2 1 1 1 1 ]
11:  [ 1 1 2 2 1 1 ]
12:  [ 1 1 2 2 2 ]
13:  [ 1 1 2 3 1 ]
14:  [ 1 1 3 2 1 ]
15:  [ 1 2 1 1 1 1 1 ]
16:  [ 1 2 2 1 1 1 ]
17:  [ 1 2 2 2 1 ]
18:  [ 1 2 2 3 ]
19:  [ 1 2 3 1 1 ]
20:  [ 1 2 3 2 ]
21:  [ 1 3 2 1 1 ]
22:  [ 1 3 2 2 ]
23:  [ 2 1 1 1 1 1 1 ]
24:  [ 2 2 1 1 1 1 ]
25:  [ 2 2 2 1 1 ]
26:  [ 2 2 3 1 ]
27:  [ 2 3 1 1 1 ]
28:  [ 2 3 2 1 ]
29:  [ 3 2 1 1 1 ]
30:  [ 3 2 2 1 ]
From _Gus Wiseman_, Mar 05 2020: (Start)
The a(1) = 1 through a(6) = 13 compositions:
  (1)  (11)  (12)   (112)   (122)    (123)
             (21)   (121)   (221)    (132)
             (111)  (211)   (1112)   (231)
                    (1111)  (1121)   (321)
                            (1211)   (1122)
                            (2111)   (1221)
                            (11111)  (2211)
                                     (11112)
                                     (11121)
                                     (11211)
                                     (12111)
                                     (21111)
                                     (111111)
(End)
		

Crossrefs

Cf. A001523 (unimodal compositions), A001522 (smooth unimodal compositions with first and last part 1), A001524 (unimodal compositions such that each up-step is by at most 1 and first part is 1).
Organizing by length rather than sum gives A007052.
The complement is counted by A332743.
The case of run-lengths of partitions is A332577, with complement A332579.
Compositions covering an initial interval are A107429.
Non-unimodal compositions are A115981.

Programs

  • 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=1..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
    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, 1, n/i}]]; a[n_] := If[n==0, 1, b[n, 1]]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Apr 09 2015, after Alois P. Heinz *)
    normQ[m_]:=m=={}||Union[m]==Range[Max[m]];
    unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],normQ[#]&&unimodQ[#]&]],{n,0,10}] (* Gus Wiseman, Mar 05 2020 *)

Formula

a(n) ~ c * exp(Pi*sqrt(r*n)) / n, where r = 0.9409240878664458093345791978063..., c = 0.05518035191234679423222212249... - Vaclav Kotesovec, Mar 04 2020
a(n) + A332743(n) = 2^(n - 1). - Gus Wiseman, Mar 05 2020

A224704 Number of stacks of n triangles, pointing upwards or downwards depending on row parity.

Original entry on oeis.org

1, 1, 1, 2, 4, 7, 13, 24, 45, 84, 156, 291, 543, 1013, 1889, 3524, 6575, 12266, 22883, 42691, 79647, 148593, 277221, 517197, 964911, 1800189, 3358526, 6265846, 11689902, 21809313, 40688632, 75910917, 141623529, 264220545, 492944193, 919663462, 1715774125
Offset: 0

Views

Author

Paul Tek, Apr 16 2013

Keywords

Comments

A stack is formed by starting with a row of triangles pointing upwards, and then additional triangles pointing downwards can be inserted between adjacent triangles pointing upwards, and additional triangles pointing upwards can be put on top of triangles pointing downwards.
Number of compositions of n with a(1) = 1 and a(i+1) <= a(i) + 1 + mod(a(i),2).
From Peter Bala, Jul 12 2019: (Start)
These triangle stacks may be defined using Schröder paths. A Schröder path is a lattice path in the plane starting and ending on the x-axis, never going below the x-axis, using the steps (1,1) rise, (1,-1) fall or (2,0) flat. A small Schröder path is a Schröder path with no flat steps on the x-axis.
The area between a small Schröder path and the x-axis may be decomposed into a stack of unit area triangles of two types - up triangles with vertices at the lattice points (x, y), (x+1, y+1) and (x+2, y) and down triangles with vertices at the lattice points (x, y), (x-1, y+1) and (x+1, y+1). (End)

Crossrefs

Column 1 of A316354 (except a(0)).

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ 1/(1 + ContinuedFractionK[ - q^(2 k - 1), 1 - q^(2 k), {k, Ceiling @ Sqrt[n]}]), {q, 0, n}]; (* Michael Somos, Jul 14 2019 *)
  • Perl
    use bigint;
    my $max = 100;
    my @d = ( [1] );
    foreach my $n (0..$max) {
        my $a = 0;
        foreach my $h (0..$#{$d[$n]}) {
            $a += $d[$n][$h];
            my $maxh = ($h % 2) ? ($h+2) : ($h+1);
            foreach my $newh (1..$maxh) {
                $d[$n+$newh][$newh] += $d[$n][$h];
            }
        }
        print "$a,";
    }

Formula

From Peter Bala, Jul 03 2019: (Start)
O.g.f. as a continued fraction: A(q) = 1/(1 - q/(1 - q^2 - q^3/(1 - q^4 - q^5/(1 - q^6 - q^7/( ... ) )))). Also,
A(q) = 1/(1 - q/(1 - (q^2 + q^3)/(1 - q^5/(1 - (q^4 + q^7)/(1 - q^9/(1 - (q^6 + q^11)/(1 - q^13/( ... ) ))))))) and
A(q) = 1/(2 - (1 + q)/(2 - (1 + q^3)/(2 - (1 + q^5)/(2 - (1 + q^7)/( ... ) )))).
O.g.f. as a ratio of q-series: A(q) = N(q)/D(q), where N(q) = Sum_{n >= 0} (-1)^n*q^(2*n^2+n)/( (1-q^2)*(1-q^4)*...*(1-q^(2*n)) )^2 and D(q) = Sum_{n >= 0} (-1)^n*q^(2*n^2-n)/( (1-q^2)*(1-q^4)*...*(1-q^(2*n)) )^2.
D(q) has its least (simple) real zero at x = 0.53600 49695 29708 61653 44946 12214 97438 08884 63471 33627....
a(n) ~ c*x^(-n) where c = 0.30516 69461 42293 61432 58334 29163 22891 57284 39056 20388 ... = - N(x)/(x*D'(x)) and the prime indicates differentiation w.r.t. q. (End)

A053260 Coefficients of the '5th-order' mock theta function psi_0(q).

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 2, 2, 2, 3, 3, 2, 3, 3, 3, 3, 4, 4, 4, 5, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 9, 8, 9, 10, 9, 11, 11, 11, 12, 13, 13, 14, 15, 15, 16, 17, 17, 18, 19, 19, 21, 22, 22, 24, 25, 25, 27, 28, 29, 30, 32, 32, 34, 36, 36, 39, 40, 41, 44, 45, 46
Offset: 0

Views

Author

Dean Hickerson, Dec 19 1999

Keywords

Comments

Number of partitions of n such that each part occurs at most twice, the largest part is unique and if k occurs as a part then all smaller positive integers occur.
Strongly unimodal compositions with first part 1 and each up-step is by at most 1 (left-smoothness); with this interpretation one should set a(0)=1; see example. Replacing "strongly" by "weakly" in the condition gives A001524. Dropping the requirement of unimodality gives A005169. [Joerg Arndt, Dec 09 2012]

Examples

			From _Joerg Arndt_, Dec 09 2012: (Start)
The a(42)=8 strongly unimodal left-smooth compositions are
[ #]       composition
[ 1]    [ 1 2 3 4 5 6 7 5 4 3 2 ]
[ 2]    [ 1 2 3 4 5 6 7 6 4 3 1 ]
[ 3]    [ 1 2 3 4 5 6 7 6 5 2 1 ]
[ 4]    [ 1 2 3 4 5 6 7 6 5 3 ]
[ 5]    [ 1 2 3 4 5 6 7 8 3 2 1 ]
[ 6]    [ 1 2 3 4 5 6 7 8 4 2 ]
[ 7]    [ 1 2 3 4 5 6 7 8 5 1 ]
[ 8]    [ 1 2 3 4 5 6 7 8 6 ]
(End)
		

References

  • Srinivasa Ramanujan, Collected Papers, Chelsea, New York, 1962, pp. 354-355.
  • Srinivasa Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa Publishing House, New Delhi, 1988, pp. 19, 21, 22.

Crossrefs

Other '5th-order' mock theta functions are at A053256, A053257, A053258, A053259, A053261, A053262, A053263, A053264, A053265, A053266, A053267.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
           b(n, i-1)+`if`(i>n, 0, b(n-i, i-1))))
        end:
    a:= proc(n) local h, k, m, r;
          m, r:= floor((sqrt(n*8+1)-1)/2), 0;
          for k from m by -1 do h:= k*(k+1);
            if h<=n then break fi;
            r:= r+b(n-h/2, k-1)
          od: r
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Aug 02 2013
  • Mathematica
    Series[Sum[q^((n+1)(n+2)/2) Product[1+q^k, {k, 1, n}], {n, 0, 12}], {q, 0, 100}]
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, b[n-i, i-1] ] ]]; a[n_] := Module[{h, k, m, r}, {m, r} = {Floor[(Sqrt[n*8+1]-1)/2], 0}; For[k = m, True, k--, h = k*(k+1); If[h <= n, Break[]]; r = r + b[n-h/2, k-1]]; r]; Table[ a[n], {n, 0, 100}] (* Jean-François Alcover, Apr 09 2015, after Alois P. Heinz *)
  • PARI
    N = 66;  x = 'x + O('x^N);
    gf = sum(n=1,N, x^(n*(n+1)/2) * prod(k=1,n-1,1+x^k) ) + 'c0;
    v = Vec(gf); v[1]-='c0; v
    /* Joerg Arndt, Apr 21 2013 */

Formula

G.f.: psi_0(q) = Sum_{n>=0} q^((n+1)*(n+2)/2) * (1+q)*(1+q^2)*...*(1+q^n).
a(n) ~ exp(Pi*sqrt(n/15)) / (2*5^(1/4)*sqrt(phi*n)), where phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Jun 12 2019

A186085 Number of 1-dimensional sandpiles with n grains.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 5, 8, 13, 22, 36, 60, 100, 166, 277, 461, 769, 1282, 2137, 3565, 5945, 9916, 16540, 27589, 46022, 76769, 128062, 213628, 356366, 594483, 991706, 1654352, 2759777, 4603843, 7680116, 12811951, 21372882, 35654237, 59478406, 99221923, 165522118, 276124217, 460630839
Offset: 0

Views

Author

Joerg Arndt, Feb 12 2011

Keywords

Comments

Number of compositions of n where the first and the last parts are 1 and the absolute difference between consecutive parts is <=1 (smooth compositions).
Such a composition [c1,c2,c3,...] corresponds to a sandpile with c1(=1) grains in the first positions, c2 in the second, and so on. Assuming the critical slope is 1 (for the pile to be stable) we obtain the conditions on the compositions.
With the additional requirement of unimodality one gets A001522. [Joerg Arndt, Dec 09 2012]
Dropping the requirement that the first and last parts are 1 gives A034297. Restriction to weakly increasing (or decreasing) sums gives A034296. [Joerg Arndt, Jun 02 2013]
Also the number of compositions of n with first part 1, up-steps of at most 1, and no two consecutive up-steps. The sandpiles are recovered by shifting the rows above the bottom row to the left by one position relative to the next lower row. [Joerg Arndt, Mar 30 2014]
Also fountains of coins (cf. A005169) with no consecutive up-steps. Shift the top rows in the previous comment by half a position. [Joerg Arndt, Mar 30 2014]

Examples

			The a(7)=8 smooth compositions of 7 are:
:   1:      [ 1 1 1 1 1 1 1 ]  (composition)
:
: ooooooo  (rendering of sandpile)
:
:   2:      [ 1 1 1 1 2 1 ]
:
:     o
: oooooo
:
:   3:      [ 1 1 1 2 1 1 ]
:
:    o
: oooooo
:
:   4:      [ 1 1 2 1 1 1 ]
:
:   o
: oooooo
:
:   5:      [ 1 1 2 2 1 ]
:
:   oo
: ooooo
:
:   6:      [ 1 2 1 1 1 1 ]
:
:  o
: oooooo
:
:   7:      [ 1 2 1 2 1 ]
:
:  o o
: ooooo
:
:   8:      [ 1 2 2 1 1 ]
:
:  oo
: ooooo
		

Crossrefs

Cf. A186084 (sandpiles by base length).
Cf. A005169 (compositions of n with c(1)=1 and c(i+1)<=c(i)+1).
Cf. A186505 (antidiagonal sums of triangle A186084).
Cf. A129181.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, `if`(i=1, 1, 0),
          `if`(n<0 or i<1, 0, add(b(n-i, i+j), j=-1..1)))
        end:
    a:= n-> `if`(n=0, 1, b(n-1, 1)):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jun 11 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, If[i == 1, 1, 0], If[n<0 || i<1, 0, Sum[b[n-i, i+j], {j, -1, 1}]]]; a[n_] := If[n == 0, 1, b[n-1, 1]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 03 2014, after Alois P. Heinz *)
  • PARI
    {a(n)=local(Txy=1+x*y); for(i=1, n, Txy=1/(1-x*y-x^3*y^2*subst(Txy, y, x*y+x*O(x^n)))); polcoeff(subst(1+x*Txy, y, 1), n, x)} /* Paul D. Hanna */
    
  • PARI
    /* continued fraction for terms up to 460630839: */
    Vec(1/ (1-x/ (1-x^3/ (1-x^2/ (1-x^3/ (1-x^7/ (1-x^4/ (1-x^5/ (1-x^11/ (1-x^6/(1-x*O(x^0) ))))))))))) /* Paul D. Hanna */
    
  • PARI
    N = 66; x = 'x + O('x^N);
    Q(k) = if(k>N, 1, 1/x^(k+1) - 1 - 1/Q(k+1) );
    gf = 1 + 1/Q(0);
    Vec(gf) /* Joerg Arndt, May 07 2013 */

Formula

G.f.: 1 + x/(1-x - x^3*B(x)) where B(x) equals the g.f. of the antidiagonal sums of triangle A186084 [Paul D. Hanna].
G.f.: 1 + x/(1-x - x^3/(1-x^2 - x^5/(1-x^3 - x^7/(1-x^4 - x^9/(1 -...))))) (continued fraction). [Paul D. Hanna].
G.f.: 1/(1 - x/(1-x^3/(1-x^2/(1 - x^3/(1-x^7/(1-x^4/(1 - x^5/(1-x^11/(1-x^6/(1 -...)))))))))) (continued fraction). [Paul D. Hanna].
The g.f. T(x,y) of triangle A186084 satisfies: T(x,y) = 1/(1 - x*y - x^3*y^2*T(x,x*y)); therefore, the g.f. of this sequence is A(x) = 1 + x*T(x,1). [Paul D. Hanna]
a(n) ~ c/r^n where r = 0.5994477646147968266874606710272382... and c = 0.213259838728143595595398989847345... [Paul D. Hanna]
G.f.: 1 + 1/Q(0), where Q(k)= 1/x^(k+1) - 1 - 1/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 07 2013
G.f.: G(1), where G(k) = 1 + x^k/( 1 - x^k * G(k+1) ) (continued fraction). [Joerg Arndt, Jun 29 2013]
a(n) = Sum_{j=1..n} A129181(n-j,j-1) for n>=1. - Alois P. Heinz, Jun 25 2023

A259095 Triangle read by rows: T(n,r) = number of arrangements of n pennies in rows, with r contiguous pennies in the bottom row, and each higher row consisting of contiguous pennies, each touching two pennies in the row below (1 <= r <= n).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 0, 2, 1, 0, 0, 1, 3, 1, 0, 0, 1, 2, 4, 1, 0, 0, 0, 3, 3, 5, 1, 0, 0, 0, 2, 5, 4, 6, 1, 0, 0, 0, 1, 5, 7, 5, 7, 1, 0, 0, 0, 1, 5, 8, 9, 6, 8, 1, 0, 0, 0, 0, 4, 10, 11, 11, 7, 9, 1, 0, 0, 0, 0, 3, 11, 15, 14, 13, 8, 10, 1, 0, 0, 0, 0, 2, 9, 19, 20, 17, 15, 9, 11, 1, 0, 0, 0, 0, 1, 9, 20, 27, 25, 20, 17, 10, 12, 1, 0, 0, 0, 0, 1, 7, 20, 32, 35, 30, 23, 19, 11, 13, 1
Offset: 1

Views

Author

N. J. A. Sloane, Jun 19 2015

Keywords

Comments

Computed by R. K. Guy (see link).

Examples

			Triangle begins:
  1,
  0,1,
  0,1,1,
  0,0,2,1,
  0,0,1,3,1,
  0,0,1,2,4,1,
  0,0,0,3,3,5,1,
  0,0,0,2,5,4,6,1,
  0,0,0,1,5,7,5,7,1,
  0,0,0,1,5,8,9,6,8,1,
  0,0,0,0,4,10,11,11,7,9,1,
  0,0,0,0,3,11,15,14,13,8,10,1,
  0,0,0,0,2,9,19,20,17,15,9,11,1,
  0,0,0,0,1,9,20,27,25,20,17,10,12,1,
  0,0,0,0,1,7,20,32,35,30,23,19,11,13,1,
  ...
(An unusually large number of rows are shown in order to explain the related sequences A005575-A005578.)
		

Crossrefs

Cf. A001524 (row sums), A001519 (column sums).
Cf. also A005575 (a diagonal), A005576, A005577 (row maxima), A005578.

Programs

  • Maple
    b:= proc(n, i, d) option remember; `if`(i*(i+1)/2n, 0, d*b(n-i, i-1, 1))))
        end:
    T:= (n, r)-> b(n-r, r-1, 1):
    seq(seq(T(n,r), r=1..n), n=1..15);  # Alois P. Heinz, Jul 08 2016
  • Mathematica
    b[n_, i_, d_] := b[n, i, d] = If[i*(i+1)/2 < n, 0, If[n == 0, 1, b[n, i-1, d+1] + If[i > n, 0, d*b[n-i, i-1, 1]]]];
    T[n_, r_] := b[n-r, r-1, 1];
    Table[T[n, r], {n, 1, 15}, {r, 1, n}] // Flatten (* Jean-François Alcover, Jul 27 2016, after Alois P. Heinz *)

Formula

T(n,r) = Sum_{D(n,r)} Product_{k=2..m} abs(p[k]-p[k-1]) where the sum ranges over all partitions of n into distinct parts with maximal part r and the product over the m-1 pairs of successive parts; m is the number of parts in the partition under consideration. [Joerg Arndt, Apr 09 2016]

A168368 Number of stable connected piles of n bricks.

Original entry on oeis.org

0, 1, 1, 2, 4, 7, 12, 21
Offset: 0

Views

Author

Keywords

Comments

This sequence is similar to various sequences with rows of coins (often pennies). Each brick must be offset by 1/2 brick from any bricks under it. However, a brick might only have a brick under one half, provided the pile is stable. A definition of stability is provided in the Paterson paper.
Since the main goal of the Paterson paper is the search for stable piles with maximum overhang (and not to find the number of stable piles), it is likely that some stable piles configurations not leading to significant overhangs have been passed over. So it is not easy to determine whether or not all the stable piles configurations have been accounted for! So even though I added graphic depictions for n=8 and n=9 (cf. A168368a), I will abstain for now from appending a(8) and a(9) to this sequence until it has been ascertained that none are missing (please verify A168368a).
Connected piles only (allowing piles with disconnected subpiles would produce a different sequence).
For this sequence I assumed that the bricks on any given row need not be contiguous. A different sequence would be produced if we required the bricks on any given row to be contiguous (fewer piles of bricks since the piles would constitute a subset of the ones obtained from the current piles).
a(0) is set to 0 (no pile) instead of 1 (empty pile) since the number a(n) of stable connected piles of n bricks with height <= 2 is F_n (n-th Fibonacci number) and at least 4 bricks are needed to make a stable connected pile of height greater than 2 and outgrow the Fibonacci sequence {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...}.
The number of stable connected piles of n bricks is T_n (n-th tribonacci numbers, with a(0)=0, a(1)=a(2)=1, T_n = {0, 1, 1, 2, 4, 7, 13, 24, 44, 81, ...}) up to n=5, after which it falls behind (for n >= 6).
The following few comments describe only one of many kinds of stacks known to be self stable or stabilizable via a balancing set on top, e.g. the n-diamonds stacks.
The n-diamonds (of width n, with n^2 bricks) are self stable (no balancing set needed) for n = 1 to 4 only (<1>, <2>, <3>, <4> only):
... & ..... & ....... & ...|=|...
... & ..... & ....... & ..|=|=|..
... & ..... & ..|=|.. & .|=|=|=|.
... & ..... & .|=|=|. & |=|=|=|=|
... & .|=|. & |=|=|=| & .|=|=|=|.
... & |=|=| & .|=|=|. & ..|=|=|..
|=| & .|=|. & ..|=|.. & ...|=|...
For n >= 5, the n-diamonds need a balancing set with at least 2^n-n^2-1 bricks on top of the n^2 bricks of the n-diamond for a combined total of 2^n-1 bricks.
For n=5 we need a balancing set of at least 2^5-5^2-1 = 6 bricks |B|, e.g., a 2-diamond <2> on top of |B|B| to stabilize <5>:
.<2>.
|B|B|
.<5>.
-----
= 6 = balancing bricks.
For n=6 we need a balancing set of at least 2^6-6^2-1 = 27 bricks |B| to stabilize <6>, e.g.:
.|B|.
|B|B|
.<2>. or .<2>.
|B|B| or |B|B|
.<2>. or .<2>. or .<2>. or .|B|.
|B|B| or |B|B| or |B|B| or |B|B|
.<2>. or .<2>. or .<3>. or .<2>. or .<3>.
|B|B| or |B|B| or |B|B| or |B|B| or |B|B|
.<2>. or .<3>. or .<3>. or .<4>. or .<4>.
|B|B| or |B|B| or |B|B| or |B|B| or |B|B|
.<6>. or .<6>. or .<6>. or .<6>. or .<6>.
----- .. ----- .. ----- .. ----- .. -----
= 27= .. = 29= .. = 28= .. = 27= .. = 29= balancing bricks.
For n=7 we need a balancing set of at least 2^7-7^2-1 = 78 bricks |B| to stabilize <7>, where the balancing set itself might need its own balancing subset as in the following example:
.|B|.
|B|B|
.<3>.
|B|B|
.<5>.
|B|B|
.<6>.
|B|B|
.<7>.
-----
= 79 = balancing bricks (where <5> itself needs 6 balancing bricks).

Examples

			Following is a graphic depiction of the stable connected piles of bricks for n = 0 to 4 ordered by increasing height (all piles of a given height within curly braces) and each variant of a given pattern within square brackets, where C(k, i) is k choose i (binomial coefficient), F_n is n-th Fibonacci number [F_n = Sum_{k+i = n-1, i <= k} C(k, i)]. Also, the piles of heights 1 and 2 are grouped within parentheses (since they give the n-th Fibonacci number).
For n = 0, the following 0 [F_0] piles:
( { } )
For n = 1, the following 1 [F_1 = C(0, 0) = 1] pile:
( { |=| } )
For n = 2, the following 1 [F_2 = C(1, 0) = 1] pile:
( { |=|=| } )
For n = 3, the following 2 [F_3 = C(2, 0) + C(1, 1) = 2] piles:
( { ....... } & { .|=|. } )
( { |=|=|=| } & { |=|=| } )
For n = 4, the following 4 [F_4 + 1 = (C(3, 0) + C(2, 1)) + 1 = 3 + 1] piles (where the brick on the third level is necessary for stability):
( { ......... } & { ....... & ....... } ) & { .|=|. }
( { ......... } & { .|=|... & ...|=|. } ) & { |=|=| }
( { |=|=|=|=| } & { |=|=|=| & |=|=|=| } ) & { .|=|. }
		

Crossrefs

Extensions

Edited by Daniel Forgues, Nov 29 2009, Dec 13 2009

A340659 The number of overpartitions of n having an equal number of overlined and non-overlined parts.

Original entry on oeis.org

1, 0, 1, 2, 3, 5, 7, 11, 15, 23, 31, 45, 61, 85, 114, 156, 206, 276, 363, 477, 621, 808, 1041, 1339, 1713, 2182, 2769, 3501, 4409, 5534, 6927, 8635, 10741, 13316, 16467, 20303, 24980, 30643, 37518, 45815, 55836, 67889, 82395, 99772, 120609, 145501, 175229, 210637
Offset: 0

Views

Author

Jeremy Lovejoy, Jan 15 2021

Keywords

Examples

			a(5) = 5 counts the overpartitions [4',1], [4,1'], [3',2], [3,2'], and [2',1',1,1].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, c) option remember; `if`(n=0,
          `if`(c=0, 1, 0), `if`(i<1, 0, b(n, i-1, c)+add(
           add(b(n-i*j, i-1, c+j-t), t=[0, 2]), j=1..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Jan 15 2021
  • Mathematica
    b[n_, i_, c_] := b[n, i, c] = If[n==0, If[c==0, 1, 0], If[i<1, 0, b[n, i-1, c] + Sum[Sum[b[n-i*j, i-1, c+j-t], {t, {0, 2}}], {j, 1, n/i}]]];
    a[n_] := b[n, n, 0];
    a /@ Range[0, 60] (* Jean-François Alcover, Jan 29 2021, after Alois P. Heinz *)
    nmax = 50; CoefficientList[Series[1 + Sum[x^(j*(j+1)/2 + j) / QPochhammer[x, x, j]^2, {j, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jun 06 2021 *)

Formula

G.f.: Sum_{n>=0} q^(n*(n+1)/2 + n)/Product_{k=1..n} (1-q^k)^2.
a(n) ~ exp(2*Pi*sqrt(n/5)) / (2^(3/2) * 5^(3/4) * phi^2 * n), where phi = A001622 is the golden ratio. - Vaclav Kotesovec, Jun 06 2021
a(n) = A143184(n) - A001524(n). - Vaclav Kotesovec, Jun 06 2021

Extensions

a(0)=1 prepended by Alois P. Heinz, Jan 15 2021
Showing 1-10 of 15 results. Next