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 11 results. Next

A293136 Irregular triangle T(n,k) read by rows: T(n,k) is the number of strongly unimodal compositions of n (A059618) into k parts.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 2, 1, 0, 1, 4, 1, 0, 1, 4, 5, 0, 1, 6, 6, 2, 0, 1, 6, 10, 4, 0, 1, 8, 14, 6, 1, 0, 1, 8, 19, 14, 1, 0, 1, 10, 23, 20, 5, 0, 1, 10, 31, 30, 10, 0, 1, 12, 36, 42, 18, 2, 0, 1, 12, 44, 60, 27, 4, 0, 1, 14, 52, 76, 48, 8, 0, 1, 14, 61, 102, 68, 16, 1, 0, 1, 16, 69, 126, 101, 30, 1, 0, 1, 16, 81, 160, 138, 50, 5, 0
Offset: 0

Views

Author

Joerg Arndt, Oct 01 2017

Keywords

Comments

Conjecture: index k of last nonzero entry in row n of is A293137(n).

Examples

			Triangle starts:
00:  [1]
01:  [0, 1]
02:  [0, 1]
03:  [0, 1, 2]
04:  [0, 1, 2, 1]
05:  [0, 1, 4, 1]
06:  [0, 1, 4, 5]
07:  [0, 1, 6, 6, 2]
08:  [0, 1, 6, 10, 4]
09:  [0, 1, 8, 14, 6, 1]
10:  [0, 1, 8, 19, 14, 1]
11:  [0, 1, 10, 23, 20, 5]
12:  [0, 1, 10, 31, 30, 10]
13:  [0, 1, 12, 36, 42, 18, 2]
14:  [0, 1, 12, 44, 60, 27, 4]
15:  [0, 1, 14, 52, 76, 48, 8]
16:  [0, 1, 14, 61, 102, 68, 16, 1]
17:  [0, 1, 16, 69, 126, 101, 30, 1]
18:  [0, 1, 16, 81, 160, 138, 50, 5]
19:  [0, 1, 18, 90, 194, 191, 80, 10]
20:  [0, 1, 18, 102, 238, 252, 118, 22]
...
Row n=7 is [0, 1, 6, 6, 2] because in the 15 partitions of 7 there is 0 into zero parts, 1 into one part, 6 into two parts, 6 into three parts, and 2 into four parts:
[ 1]   [ 1 2 3 1 ]
[ 2]   [ 1 2 4 ]
[ 3]   [ 1 3 2 1 ]
[ 4]   [ 1 4 2 ]
[ 5]   [ 1 5 1 ]
[ 6]   [ 1 6 ]
[ 7]   [ 2 3 2 ]
[ 8]   [ 2 4 1 ]
[ 9]   [ 2 5 ]
[10]   [ 3 4 ]
[11]   [ 4 2 1 ]
[12]   [ 4 3 ]
[13]   [ 5 2 ]
[14]   [ 6 1 ]
[15]   [ 7 ]
		

Crossrefs

Cf. A059618 (row sums), A293137.
Cf. A072704 (same for weakly unimodal compositions).

Programs

  • PARI
    N=25;  x='x+O('x^N);
    T=Vec(1 + sum(n=1, N, t*x^(n) * prod(k=1, n-1, 1+t*x^k)^2));
    for(r=1,#T, print(Vecrev(T[r])) );  \\ as triangle

Formula

G.f.: 1 + Sum_{n>=1} t*x^n * ( Product_{k=1..n-1} 1 + t*x^k )^2.

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

A072706 Number of unimodal partitions/compositions of n into distinct terms.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Jul 04 2002

Keywords

Comments

Also the number of ways to partition a strict integer partition of n into two unordered blocks. - Gus Wiseman, Dec 31 2019

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)
		

Crossrefs

The non-strict version is A001523.

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

a(n) = sum_k A072705(n, k) = A032020(n)-A072707(k) = A032302(n)/2 (n>0).
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

A195012 Sum of positive cranks minus the sum of positive ranks of all partitions of n.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 5, 7, 10, 13, 17, 24, 31, 40, 53, 69, 88, 113, 144, 183, 231, 290, 362, 453, 563, 696, 859, 1058, 1296, 1587, 1935, 2354, 2856, 3458, 4175, 5033, 6051, 7259, 8692, 10390, 12391, 14756, 17537, 20808, 24648, 29151, 34417, 40581, 47773, 56158
Offset: 1

Views

Author

Omar E. Pol, Jan 10 2012

Keywords

Comments

It appears this is also the column 0 of triangle A195011 without the first one (see the Andrews-Garvan-Liang paper, page 16).
Is this also the ospt(n) function mentioned in the Andrews-Chan-Kim paper? Is A115995(n) the first crank momment? Is A209616(n) the first rank moment? - Omar E. Pol, Apr 07 2012
From Jeremy Lovejoy, Oct 14 2022: (Start)
a(n) is also the number of rank 0 strongly unimodal sequences of size n. A strongly unimodal sequence is a sequence of positive integers which are strictly increasing up to a point (the peak) and then strictly decreasing thereafter. The size is the sum of all of the parts and the rank is the number of parts to the left of the peak minus the number of parts to the right of the peak.
For example, there are 10 strongly unimodal sequences of size 6: (6), (1,5), (5,1), (2,4), (4,2), (1,4,1), (3,2,1), (1,2,3), (1,3,2), and (2,3,1). The sequences (6), (1,4,1), (1,3,2), and (2,3,1) have rank 0, and so a(6) = 4. (End)

Examples

			For n = 6 we have:
------------------------------------------------
Partitions
of 6                  Crank             Rank
------------------------------------------------
6                           6        6 - 1 =  5
3+3                         3        3 - 2 =  1
4+2                         4        4 - 2 =  2
2+2+2                       2        2 - 3 = -1
5+1                1 - 1 =  0        5 - 2 =  3
3+2+1              2 - 1 =  1        3 - 3 =  0
4+1+1              1 - 2 = -1        4 - 3 =  1
2+2+1+1            0 - 2 = -2        2 - 4 = -2
3+1+1+1            0 - 3 = -3        3 - 4 = -1
2+1+1+1+1          0 - 4 = -4        2 - 5 = -3
1+1+1+1+1+1        0 - 6 = -6        1 - 6 = -5
------------------------------------------------
The sum of positive cranks is 6+3+4+2+1 = 16 and the sum of positive ranks is 5+1+2+3+1 = 12 therefore a(6) = 16 - 12 = 4.
		

Crossrefs

Programs

  • Maple
    # Based on Theorem 1 of Andrews-Chan-Kim:
    M:=101;
    qinf:=mul(1-q^i,i=1..M);
    qinf:=series(qinf,q,M);
    C1:=add((-1)^(n+1)*q^(n*(n+1)/2)/(1-q^n),n=1..M);
    C1:=series(C1/qinf,q,M);
    R1:=add((-1)^(n+1)*q^(n*(3*n+1)/2)/(1-q^n),n=1..M);
    R1:=series(R1/qinf,q,M);
    series(C1-R1,q,M);
    seriestolist(%); # N. J. A. Sloane, Sep 04 2012
  • Mathematica
    M = 101;
    qinf = Product[1-q^i, {i, 1, M}];
    qinf = Series[qinf, {q, 0, M}];
    C1 = Sum[(-1)^(n+1) q^(n(n+1)/2)/(1-q^n), {n, 1, M}];
    C1 = Series[C1/qinf, {q, 0, M}];
    R1 = Sum[(-1)^(n+1) q^(n(3n+1)/2)/(1-q^n), {n, 1, M}];
    R1 = Series[R1/qinf, {q, 0, M}];
    CoefficientList[Series[C1-R1, {q, 0, M}], q] // Rest (* Jean-François Alcover, Aug 18 2018, translated from Maple *)

Formula

a(n) = A115995(n) - A209616(n).
From Jeremy Lovejoy, Oct 14 2022: (Start)
G.f.: (1/Product_{n>=1}(1-x^n))*Sum_{n>=1} x^(n*(n+1)/2)*(-1)^(n-1)*(1-x^(n^2))/(1-x^n).
G.f.: (1/Product_{n>=1}(1-x^n))*Sum_{n,r>=0} (-1)^(n+r)*x^(n*(3*n+5)/2+2*n*r+r*(r+3)/2). (End)
a(n) ~ exp(Pi*sqrt(2*n/3)) / (16*sqrt(3)*n). - Vaclav Kotesovec, Jul 06 2025

Extensions

New name, example and more terms from Omar E. Pol, Apr 06 2012
More terms a(44)-a(50) from Alois P. Heinz, Apr 08 2012

A238872 Number of strongly unimodal compositions of n with absolute difference of successive parts = 1.

Original entry on oeis.org

1, 1, 1, 3, 2, 3, 3, 4, 3, 6, 4, 3, 5, 6, 4, 9, 5, 3, 7, 7, 5, 9, 6, 6, 8, 9, 5, 9, 8, 6, 10, 6, 5, 15, 8, 9, 10, 7, 7, 12, 10, 3, 11, 15, 7, 15, 8, 6, 13, 12, 9, 12, 9, 9, 14, 12, 7, 15, 12, 6, 15, 13, 6, 21, 12, 12, 13, 6, 11, 15, 15, 9, 14, 12, 8, 24, 10, 9
Offset: 0

Views

Author

Joerg Arndt, Mar 21 2014

Keywords

Examples

			The a(33) = 15 such compositions of 33 are:
01:  [ 1 2 3 4 5 6 5 4 3 ]
02:  [ 2 3 4 5 6 7 6 ]
03:  [ 3 4 5 6 5 4 3 2 1 ]
04:  [ 3 4 5 6 7 8 ]
05:  [ 4 5 6 7 6 5 ]
06:  [ 5 6 7 6 5 4 ]
07:  [ 5 6 7 8 7 ]
08:  [ 6 7 6 5 4 3 2 ]
09:  [ 7 8 7 6 5 ]
10:  [ 8 7 6 5 4 3 ]
11:  [ 10 11 12 ]
12:  [ 12 11 10 ]
13:  [ 16 17 ]
14:  [ 17 16 ]
15:  [ 33 ]
G.f. = 1 + x + x^2 + 3*x^3 + 2*x^4 + 3*x^5 + 3*x^6 + 4*x^7 + 3*x^8 + 6*x^9 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 1, Boole[n == 0], If[ OddQ[n], 1, 1/3] Length @ FindInstance[ {x >= 0, y >= 0, z >= 0, x y + y z + z x + x + y + z + 1 == n}, {x, y, z}, Integers, 10^9]]; (* Michael Somos, Jul 04 2015 *)
    a[ n_] := If[ n < 1, Boole[n == 0], Length @ FindInstance[ {1 <= y <= n, 1 <= x <= y, 1 <= z <= y, y^2 + (x - x^2 + z - z^2) / 2 == n}, {x, y, z}, Integers, 10^9]]; (* Michael Somos, Jul 04 2015 *)
  • PARI
    \\ generate the compositions
    a(n)=
    {
        if ( n==0, return(1) );
        my( ret=0 );
        my( as, ts );
        for (f=1, n,  \\ first part
            as = 0;
            for (p=f, n, \\ numper of parts in rising half
                as += p; \\ ascending sum
                if ( as > n, break() );
                if ( as == n,  ret+=1;  break() );
                ts = as;  \\ total sum
                forstep (q=p-1, 1, -1,
                    ts += q;  \\ descending sum
                    if ( ts > n, break() );
                    if ( ts == n,  ret+=1;  break() );
                );
            );
        );
        return( ret );
    }
    v=vector(100,n,a(n-1))

Formula

a(2*n) = A130695(2*n) / 3 if n>0. a(2*n + 1) = A130695(2*n + 1) = 3 * H(8*n + 3), where H is the Hurwitz class number, if n>0. - Michael Somos, Jul 04 2015

A275389 Number of set partitions of [n] with a strongly unimodal block size list.

Original entry on oeis.org

1, 1, 1, 4, 7, 19, 71, 219, 759, 2697, 12395, 47477, 231950, 1040116, 4851742, 26690821, 131478031, 736418510, 4262619682, 24680045903, 145629814329, 935900941506, 5778263418232, 37626913475878, 257550263109475, 1782180357952449, 12526035635331581
Offset: 0

Views

Author

Alois P. Heinz, Jul 26 2016

Keywords

Comments

Strongly unimodal means strictly increasing then strictly decreasing.

Examples

			a(3) = 4: 123, 12|3, 13|2, 1|23.
a(4) = 7: 1234, 123|4, 124|3, 134|2, 1|234, 1|23|4, 1|24|3.
a(5) = 19: 12345, 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 12|345, 1345|2, 134|25, 135|24, 13|245, 145|23, 14|235, 15|234, 1|2345, 1|234|5, 1|235|4, 1|245|3.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(t=0 and n>i*(i-1)/2, 0,
         `if`(n=0, 1, add(b(n-j, j, 0)*binomial(n-1, j-1), j=1..min(n, i-1))
         +`if`(t=1, add(b(n-j, j, 1)*binomial(n-1, j-1), j=i+1..n), 0)))
        end:
    a:= n-> b(n, 0, 1):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[t==0 && n > i*(i-1)/2, 0, If[n==0, 1, Sum[b[n-j, j, 0]*Binomial[n-1, j-1], {j, 1, Min[n, i-1]}] + If[t==1, Sum[b[n-j, j, 1]*Binomial[n-1, j-1], {j, i+1, n}], 0]]]; a[n_] := b[n, 0, 1]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 07 2017, translated from Maple *)

A059619 As upper right triangle, number of strongly unimodal partitions of n (strongly unimodal means strictly increasing then strictly decreasing) where initial part is k.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 3, 1, 1, 1, 4, 2, 0, 1, 1, 6, 2, 1, 1, 1, 1, 10, 4, 2, 1, 1, 1, 1, 15, 6, 3, 1, 2, 1, 1, 1, 21, 9, 4, 2, 1, 2, 1, 1, 1, 30, 12, 6, 3, 2, 2, 2, 1, 1, 1, 43, 18, 8, 5, 3, 2, 2, 2, 1, 1, 1, 59, 25, 12, 6, 3, 3, 3, 2, 2, 1, 1, 1, 82, 34, 17, 9, 5, 4, 3, 3, 2, 2, 1, 1, 1, 111, 48, 22, 12
Offset: 0

Views

Author

Henry Bottomley, Jan 31 2001

Keywords

Examples

			Rows start:
1,  1,  1,  3,  4,  6, 10, 15, 21, 30,  43,  59,  82, 111, ...
1,  0,  1,  2,  2,  4,  6,  9, 12, 18,  25,  34,  48, ...
1,  1,  0,  1,  2,  3,  4,  6,  8, 12,  17,  22, ...
1,  1,  1,  1,  1,  2,  3,  5,  6,  9,  12, ...
1,  1,  1,  2,  1,  2,  3,  3,  5, ...
1,  1,  1,  2,  2,  2,  3,  4, ...
1,  1,  1,  2,  2,  3,  3, ...
1,  1,  1,  2,  2,  3, ...
1,  1,  1,  2,  2, ...
1,  1,  1,  2, ...
1,  1,  1, ...
1,  1, ...
1, ...  etc.
T(16,6)=8 since 16 can be written as 6+10, 6+9+1, 6+8+2, 6+7+3, 6+7+2+1, 6+5+4+1, 6+5+3+2, or 6+4+3+2+1 (but for example neither 6+6+4 nor 6+8+1+1 which are only weakly unimodal).
		

Crossrefs

Top row is A059618 and is sum of other rows (for n>0). Cf. A000009, A000041, A001523, A059607.

Programs

  • Mathematica
    s[n_?Positive, k_] := s[n, k] = Sum[s[n-k, j], {j, 0, k-1}]; s[0, 0] = 1; s[0, ] = 0; s[?Negative, ] = 0; t[n, k_] := t[n, k] = s[n, k] + Sum[t[n-k, j], {j, k+1, n}]; Table[t[n, k], {n, 0, 13}, {k, 0, n}] // Flatten (* Jean-François Alcover, Sep 11 2012 *)

Formula

T(n, k)=S(n, k)+sum_j[T(n-k, j)] for j>k, where S(n, k)=A059607(n, k)=sum_j[S(n-k, j)] for k>j [note reversal] with S(0, 0)=1.

A174439 Partial sums of A001523.

Original entry on oeis.org

1, 2, 4, 8, 16, 31, 58, 105, 184, 314, 523, 853, 1365, 2149, 3332, 5097, 7701, 11505, 17009, 24907, 36147, 52027, 74304, 105352, 148355, 207575, 288673, 399157, 548926, 750996, 1022400, 1385374, 1868813, 2510181, 3357862, 4474187, 5939186
Offset: 0

Views

Author

Jonathan Vos Post, Mar 19 2010

Keywords

Comments

The subsequence of primes begins: 2, 31, 523, 853, 24907, 52027, 1868813, ...

Crossrefs

Programs

  • Mathematica
    nmax = 41; A001523 = CoefficientList[Series[1 + Sum[(-1)^(k + 1)*x^(k*(k + 1)/2), {k, 1, nmax}] / QPochhammer[x]^2, {x, 0, nmax}], x]; s = 0; Table[s = s + A001523[[k]], {k, 1, nmax}] (* Vaclav Kotesovec, Dec 13 2015 *)

Formula

a(n) = Sum_{i=0..n} A001523(i).
a(n) ~ exp(2*Pi*sqrt(n/3))/(8*Pi*3^(1/4)*n^(3/4)). - Vaclav Kotesovec, Dec 13 2015

A229707 Triangular array read by rows. T(n,k) is the number of strictly unimodal compositions of n with the greatest part equal to k; n>=1, 1<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 1, 2, 1, 0, 0, 3, 2, 1, 0, 0, 4, 3, 2, 1, 0, 0, 3, 6, 3, 2, 1, 0, 0, 2, 7, 6, 3, 2, 1, 0, 0, 1, 8, 9, 6, 3, 2, 1, 0, 0, 0, 10, 12, 9, 6, 3, 2, 1, 0, 0, 0, 8, 16, 14, 9, 6, 3, 2, 1, 0, 0, 0, 7, 20, 20, 14, 9, 6, 3, 2, 1
Offset: 1

Views

Author

Geoffrey Critzer, Sep 27 2013

Keywords

Comments

A strictly unimodal composition is a composition such that for some j,m 1 <= x(1) < x(2) < ... < x(j) > x(j+1) > ... > x(m) >= 1.
Row sums are A059618.
Sum of column k is A000302(k-1).
T(2*n+1,n+1) = A022567(n) for n>=0. - Alois P. Heinz, Oct 11 2013

Examples

			1,
0, 1,
0, 2, 1,
0, 1, 2, 1,
0, 0, 3, 2, 1,
0, 0, 4, 3, 2, 1,
0, 0, 3, 6, 3, 2, 1,
0, 0, 2, 7, 6, 3, 2, 1,
0, 0, 1, 8, 9, 6, 3, 2, 1,
0, 0, 0, 10, 12, 9, 6, 3, 2, 1
T(7,3) = 3 because we have: 1+2+3+1 = 1+3+2+1 = 2+3+2.
		

Crossrefs

Cf. A229706.

Programs

  • Maple
    b:= proc(n, t, k) option remember; `if`(n=0, `if`(k=0, 1, 0),
          `if`(k>0, `if`(n b(n, 0, k):
    seq(seq(T(n, k), k=1..n), n=1..16);  # Alois P. Heinz, Oct 07 2013
  • Mathematica
    nn=10;Table[Take[Drop[Transpose[Map[PadRight[#,nn+1,0]&,Table[CoefficientList[Series[x^n Product[(1+x^i),{i,1,n-1}]^2,{x,0,nn}],x],{n,1,nn}]]],1][[n]],n],{n,1,nn}]//Grid

Formula

O.g.f. for column k: x^k * prod(i=1..k-1, 1 + x^i)^2.

A293137 a(0) = 0, and a(n) = floor(2*sqrt(n)) - 1 for n >= 1.

Original entry on oeis.org

0, 1, 1, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18
Offset: 0

Views

Author

Joerg Arndt, Oct 01 2017

Keywords

Comments

Conjecture: a(n) is index k of last nonzero entry in row n of A293136.

Crossrefs

Programs

  • Maple
    0,seq(seq(k, n=ceil(((k+1)/2)^2) .. ceil(((k+2)/2)^2)-1),k=0..18); # Robert Israel, Oct 01 2017
  • Mathematica
    Join[{0}, Floor[2*Sqrt[Range[100]]] - 1] (* Paolo Xausa, Nov 13 2024 *)
  • PARI
    a(n)=if(n==0,0,floor(2*sqrt(n)) - 1);
    
  • Python
    from math import isqrt
    def A293137(n): return isqrt(n<<2)-1 if n else 0 # Chai Wah Wu, Jul 28 2022

Formula

G.f.: (1-x)^(-1) * Sum_{k>=0} (x^(4*k^2+10*k+7)+x^((2*k+1)^2)+x^((2*k+2)^2)+x^(4*k^2+6*k+3)). - Robert Israel, Oct 01 2017
Showing 1-10 of 11 results. Next