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

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

A064428 Number of partitions of n with nonnegative crank.

Original entry on oeis.org

1, 0, 1, 2, 3, 4, 6, 8, 12, 16, 23, 30, 42, 54, 73, 94, 124, 158, 206, 260, 334, 420, 532, 664, 835, 1034, 1288, 1588, 1962, 2404, 2953, 3598, 4392, 5328, 6466, 7808, 9432, 11338, 13632, 16326, 19544, 23316, 27806, 33054, 39273, 46534, 55096, 65076, 76808
Offset: 0

Views

Author

Vladeta Jovovic, Sep 30 2001

Keywords

Comments

For a partition p, let l(p) = largest part of p, w(p) = number of 1's in p, m(p) = number of parts of p larger than w(p). The crank of p is given by l(p) if w(p) = 0, otherwise m(p)-w(p).
From Gus Wiseman, Mar 30 2021 and May 21 2022: (Start)
Also the number of even-length compositions of n with alternating parts strictly decreasing, or properly 2-colored partitions (proper = no equal parts of the same color) with the same number of parts of each color, or ordered pairs of strict partitions of the same length with total n. The odd-length case is A001522, and there are a total of A000041 compositions with alternating parts strictly decreasing (see A342528 for a bijective proof). The a(2) = 1 through a(7) = 8 ordered pairs of strict partitions of the same length are:
(1)(1) (1)(2) (1)(3) (1)(4) (1)(5) (1)(6)
(2)(1) (2)(2) (2)(3) (2)(4) (2)(5)
(3)(1) (3)(2) (3)(3) (3)(4)
(4)(1) (4)(2) (4)(3)
(5)(1) (5)(2)
(21)(21) (6)(1)
(21)(31)
(31)(21)
Conjecture: Also the number of integer partitions y of n without a fixed point y(i) = i, ranked by A352826. This is stated at A238394, but Resta tells me he may not have had a proof. The a(2) = 1 through a(7) = 8 partitions without a fixed point are:
(2) (3) (4) (5) (6) (7)
(21) (31) (41) (33) (43)
(211) (311) (51) (61)
(2111) (411) (331)
(3111) (511)
(21111) (4111)
(31111)
(211111)
The version for permutations is A000166, complement A002467.
The version for compositions is A238351.
This is column k = 0 of A352833.
A238352 counts reversed partitions by fixed points, rank statistic A352822.
A238394 counts reversed partitions without a fixed point, ranked by A352830.
A238395 counts reversed partitions with a fixed point, ranked by A352872. (End)
The above conjecture is true. See Section 4 of the Blecher-Knopfmacher paper in the Links section. - Jeremy Lovejoy, Sep 26 2022

Examples

			G.f. = 1 + x^2 + 2*x^3 + 3*x^4 + 4*x^5 + 6*x^6 + 8*x^7 + 12*x^8 + 16*x^9 + 23*x^10 + ... - _Michael Somos_, Jan 15 2018
From _Gus Wiseman_, May 21 2022: (Start)
The a(0) = 1 through a(8) = 12 partitions with nonnegative crank:
  ()  .  (2)  (3)   (4)   (5)    (6)    (7)     (8)
              (21)  (22)  (32)   (33)   (43)    (44)
                    (31)  (41)   (42)   (52)    (53)
                          (221)  (51)   (61)    (62)
                                 (222)  (322)   (71)
                                 (321)  (331)   (332)
                                        (421)   (422)
                                        (2221)  (431)
                                                (521)
                                                (2222)
                                                (3221)
                                                (3311)
(End)
		

References

  • B. C. Berndt, Ramanujan's Notebooks Part III, Springer-Verlag, see p. 18 Entry 9 Corollary (i).
  • G. E. Andrews, B. C. Berndt, Ramanujan's Lost Notebook Part I, Springer, see p. 169 Entry 6.7.1.

Crossrefs

These are the row-sums of the right (or left) half of A064391, inclusive.
The case of crank 0 is A064410, ranked by A342192.
The strict case is A352828.
These partitions are ranked by A352873.
A000700 = self-conjugate partitions, ranked by A088902, complement A330644.
A001522 counts partitions with positive crank, ranked by A352874.
A034008 counts even-length compositions.
A115720 and A115994 count partitions by their Durfee square.
A224958 counts compositions w/ alternating parts unequal (even: A342532).
A257989 gives the crank of the partition with Heinz number n.
A342527 counts compositions w/ alternating parts equal (even: A065608).
A342528 = compositions w/ alternating parts weakly decr. (even: A114921).

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Sum[ (-1)^k x^(k (k + 1)/2) , {k, 0, (Sqrt[1 + 8 n] - 1)/2}] / QPochhammer[ x], {x, 0, n}]]; (* Michael Somos, Jan 15 2018 *)
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Sum[  x^(k (k + 1)) / QPochhammer[ x, x, k]^2 , {k, 0, (Sqrt[1 + 4 n] - 1)/2}], {x, 0, n}]]; (* Michael Somos, Jan 15 2018 *)
    ck[y_]:=With[{w=Count[y,1]},If[w==0,If[y=={},0,Max@@y],Count[y,?(#>w&)]-w]];Table[Length[Select[IntegerPartitions[n],ck[#]>=0&]],{n,0,30}] (* _Gus Wiseman, Mar 30 2021 *)
    ici[q_]:=And@@Table[q[[i]]>q[[i+2]],{i,Length[q]-2}];
    Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n], EvenQ@*Length],ici]],{n,0,15}] (* Gus Wiseman, Mar 30 2021 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=0, (sqrtint(1 + 8*n) -1)\2, (-1)^k * x^((k+k^2)/2)) / eta( x + x * O(x^n)), n))}; /* Michael Somos, Jul 28 2003 */

Formula

a(n) = (A000041(n) + A064410(n)) / 2, n>1. - Michael Somos, Jul 28 2003
G.f.: (Sum_{k>=0} (-1)^k * x^(k(k+1)/2)) / (Product_{k>0} 1-x^k). - Michael Somos, Jul 28 2003
G.f.: Sum_{i>=0} x^(i*(i+1)) / (Product_{j=1..i} 1-x^j )^2. - Jon Perry, Jul 18 2004
a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*n*sqrt(3)). - Vaclav Kotesovec, Sep 26 2016
G.f.: (Sum_{i>=0} x^i / (Product_{j=1..i} 1-x^j)^2 ) * (Product_{k>0} 1-x^k). - Li Han, May 23 2020
a(n) = A000041(n) - A001522(n). - Gus Wiseman, Mar 30 2021
a(n) = A064410(n) + A001522(n). - Gus Wiseman, May 21 2022

A065608 Sum of divisors of n minus the number of divisors of n.

Original entry on oeis.org

0, 1, 2, 4, 4, 8, 6, 11, 10, 14, 10, 22, 12, 20, 20, 26, 16, 33, 18, 36, 28, 32, 22, 52, 28, 38, 36, 50, 28, 64, 30, 57, 44, 50, 44, 82, 36, 56, 52, 82, 40, 88, 42, 78, 72, 68, 46, 114, 54, 87, 68, 92, 52, 112, 68, 112, 76, 86, 58, 156, 60, 92, 98, 120, 80, 136, 66, 120, 92
Offset: 1

Views

Author

Jason Earls, Nov 06 2001

Keywords

Comments

Number of permutations p of {1,2,...,n} such that p(k)-k takes exactly two distinct values. Example: a(4)=4 because we have 4123, 3412, 2143 and 2341. - Max Alekseyev and Emeric Deutsch, Dec 22 2006
Number of solutions to the Diophantine equation xy + yz = n, with x,y,z >= 1.
In other words, number of ways to write n = (a + b) * k for positive integers a, b, k. - Gus Wiseman, Mar 25 2021
Not the same as A184396(n): a(66) = 136 while A184396(66) = 137. - Wesley Ivan Hurt, Dec 26 2013
From Gus Wiseman, Mar 25 2021: (Start)
Also the number of compositions of n into an even number of parts with alternating parts equal. These are finite even-length sequences q of positive integers summing to n such that q(i) = q(i+2) for all possible i. For example, the a(2) = 1 through a(8) = 11 compositions are:
(1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (1,7)
(2,1) (2,2) (2,3) (2,4) (2,5) (2,6)
(3,1) (3,2) (3,3) (3,4) (3,5)
(1,1,1,1) (4,1) (4,2) (4,3) (4,4)
(5,1) (5,2) (5,3)
(1,2,1,2) (6,1) (6,2)
(2,1,2,1) (7,1)
(1,1,1,1,1,1) (1,3,1,3)
(2,2,2,2)
(3,1,3,1)
(1,1,1,1,1,1,1,1)
The odd-length version is A062968.
The version with alternating parts weakly decreasing is A114921, or A342528 if odd-length compositions are included.
The version with alternating parts unequal is A342532, or A224958 if odd-length compositions are included (unordered: A339404/A000726).
Allowing odd lengths as well as even gives A342527.
(End)
Inverse Möbius transform of n-1. - Wesley Ivan Hurt, Jun 29 2024

Crossrefs

Starting (1, 2, 4, 4, 8, 6, ...), = row sums of triangle A077478. - Gary W. Adamson, Nov 12 2007
Starting with "1" = row sums of triangle A176919. - Gary W. Adamson, Apr 29 2010
Column k=2 of A125182.
A175342/A325545 count compositions with constant/distinct differences.

Programs

  • GAP
    List([1..100],n->Sigma(n)-Tau(n)); # Muniru A Asiru, Mar 19 2018
    
  • Maple
    with(numtheory): seq(sigma(n)-tau(n),n=1..70); # Emeric Deutsch, Dec 22 2006
  • Mathematica
    Table[DivisorSigma[1,n]-DivisorSigma[0,n], {n,100}] (* Wesley Ivan Hurt, Dec 26 2013 *)
  • PARI
    a(n) = sigma(n) - numdiv(n); \\ Harry J. Smith, Oct 23 2009
    
  • Python
    from math import prod
    from sympy import factorint
    def A065608(n):
        f = factorint(n).items()
        return prod((p**(e+1)-1)//(p-1) for p, e in f)-prod(e+1 for p,e in f) # Chai Wah Wu, Jul 16 2022

Formula

a(n) = sigma(n) - d(n) = A000203(n) - A000005(n).
a(n) = Sum_{d|n} (d-1). - Wesley Ivan Hurt, Dec 26 2013
G.f.: Sum_{k>=1} x^(2*k)/(1-x^k)^2. - Benoit Cloitre, Apr 21 2003
G.f.: Sum_{n>=1} (n-1)*x^n/(1-x^n). - Joerg Arndt, Jan 30 2011
L.g.f.: -log(Product_{k>=1} (1 - x^k)^(1-1/k)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Mar 18 2018
G.f.: Sum_{n >= 1} q^(n^2)*( (n - 1) + q^n - (n - 1)*q^(2*n) )/(1 - q^n)^2 - differentiate equation 1 in Arndt with respect to t, then set x = q and t = q. - Peter Bala, Jan 22 2021
a(n) = A342527(n) - A062968(n). - Gus Wiseman, Mar 25 2021
a(n) = n * A010054(n) - Sum_{k>=1} a(n - k*(k+1)/2), assuming a(n) = 0 for n <= 0 (Kobayashi, 2022). - Amiram Eldar, Jun 23 2023

A064410 Number of partitions of n with zero crank.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 2, 2, 4, 4, 7, 7, 11, 12, 17, 19, 27, 30, 41, 48, 62, 73, 95, 110, 140, 166, 206, 243, 302, 354, 435, 513, 622, 733, 887, 1039, 1249, 1467, 1750, 2049, 2438, 2847, 3371, 3934, 4634, 5398, 6343, 7367, 8626, 10009, 11677, 13521, 15737, 18184
Offset: 1

Views

Author

Vladeta Jovovic, Sep 29 2001

Keywords

Comments

For a partition p, let l(p) = largest part of p, w(p) = number of 1's in p, m(p) = number of parts of p larger than w(p). The crank of p is given by l(p) if w(p) = 0, otherwise m(p)-w(p).

Examples

			a(10)=4 because there are 4 partitions of 10 with zero crank: 1+1+2+3+3, 1+1+4+4, 1+1+3+5 and 1+9.
From _Gus Wiseman_, Apr 02 2021: (Start)
The a(3) = 1 through a(14) = 11 partitions (A..D = 10..13):
  21  31  41  51  61  71    81    91     A1     B1      C1      D1
                      3311  4311  4411   5411   5511    6511    6611
                                  5311   6311   6411    7411    7511
                                  33211  43211  7311    8311    8411
                                                44211   54211   9311
                                                53211   63211   55211
                                                332211  432211  64211
                                                                73211
                                                                442211
                                                                532211
                                                                3322211
(End)
		

Crossrefs

The version for positive crank is A001522.
Central column of A064391.
The version for nonnegative crank is A064428.
The Heinz numbers of these partitions are A342192.
A003242 counts anti-run compositions.
A224958 counts compositions with alternating parts unequal.
A257989 gives the crank of the partition with Heinz number n.

Programs

  • Mathematica
    nmax = 60; Rest[CoefficientList[Series[x - 1 + Sum[(-1)^k*(x^(k*(k + 1)/2) - x^(k*(k - 1)/2)), {k, 1, nmax}] / Product[1 - x^k, {k, 1, nmax}], {x, 0, nmax}], x]] (* Vaclav Kotesovec, Sep 26 2016 *)
    Flatten[{0, Table[PartitionsP[n] - 2*Sum[(-1)^(j+1)*PartitionsP[n - j*((j+1)/2)], {j, 1, Floor[(Sqrt[8*n + 1] - 1)/2]}], {n, 2, 60}]}] (* Vaclav Kotesovec, Sep 26 2016 *)
    ck[y_]:=With[{w=Count[y,1]},If[w==0,Max@@y,Count[y,_?(#>w&)]-w]];
    Table[Length[Select[IntegerPartitions[n],ck[#]==0&]],{n,0,30}] (* Gus Wiseman, Apr 02 2021 *)
  • Sage
    [[p.crank() for p in Partitions(n)].count(0) for n in (1..20)] # Peter Luschny, Sep 15 2014

Formula

a(n) = A000041(n) - 2*A001522(n). a(n) = A064391(n, 0).
a(n) ~ exp(Pi*sqrt(2*n/3)) * Pi / (3 * 2^(9/2) * n^(3/2)). - Vaclav Kotesovec, May 06 2018
a(n > 1) = A064428(n) - A001522(n), where A001522/A064428 count odd/even-length compositions with alternating parts strictly decreasing. - Gus Wiseman, Apr 02 2021
From Peter Bala, Feb 03 2024: (Start)
For n >= 2, a(n) = A188674(n+1) - A188674(n) (Hopkins and Sellers, Proposition 7).
Equivalently, the g.f. A(x) = (1 - x) * Sum_{n >= 1} x^(n*(n+2)) / Product{k = 1..n} (1 - x^k)^2. (End)

Extensions

More terms from Reiner Martin, Dec 26 2001

A342527 Number of compositions of n with alternating parts equal.

Original entry on oeis.org

1, 1, 2, 4, 6, 8, 11, 12, 16, 17, 21, 20, 29, 24, 31, 32, 38, 32, 46, 36, 51, 46, 51, 44, 69, 51, 61, 60, 73, 56, 87, 60, 84, 74, 81, 76, 110, 72, 91, 88, 115, 80, 123, 84, 117, 112, 111, 92, 153, 101, 132, 116, 139, 104, 159, 120, 161, 130, 141, 116, 205, 120, 151, 156, 178, 142, 195, 132, 183, 158
Offset: 0

Views

Author

Gus Wiseman, Mar 24 2021

Keywords

Comments

These are finite sequences q of positive integers summing to n such that q(i) = q(i+2) for all possible i.

Examples

			The a(1) = 1 through a(8) = 16 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (12)   (13)    (14)     (15)      (16)       (17)
             (21)   (22)    (23)     (24)      (25)       (26)
             (111)  (31)    (32)     (33)      (34)       (35)
                    (121)   (41)     (42)      (43)       (44)
                    (1111)  (131)    (51)      (52)       (53)
                            (212)    (141)     (61)       (62)
                            (11111)  (222)     (151)      (71)
                                     (1212)    (232)      (161)
                                     (2121)    (313)      (242)
                                     (111111)  (12121)    (323)
                                               (1111111)  (1313)
                                                          (2222)
                                                          (3131)
                                                          (21212)
                                                          (11111111)
		

Crossrefs

The odd-length case is A062968.
The even-length case is A065608.
The version with alternating parts unequal is A224958 (unordered: A000726).
The version with alternating parts weakly decreasing is A342528.
A000005 counts constant compositions.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A000203 adds up divisors.
A002843 counts compositions with all adjacent parts x <= 2y.
A003242 counts anti-run compositions.
A175342 counts compositions with constant differences.
A342495 counts compositions with constant first quotients.
A342496 counts partitions with constant first quotients (strict: A342515, ranking: A342522).

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],SameQ@@Plus@@@Reverse/@Partition[#,2,1]&]],{n,0,15}]

Formula

a(n) = 1 + n + A000203(n) - 2*A000005(n).
a(n) = A065608(n) + A062968(n).

A114921 Number of unimodal compositions of n+2 where the maximal part appears exactly twice.

Original entry on oeis.org

1, 0, 1, 2, 4, 6, 11, 16, 27, 40, 63, 92, 141, 202, 299, 426, 614, 862, 1222, 1694, 2362, 3242, 4456, 6054, 8229, 11072, 14891, 19872, 26477, 35050, 46320, 60866, 79827, 104194, 135703, 176008, 227791, 293702, 377874, 484554, 620011, 790952, 1006924
Offset: 0

Views

Author

Michael Somos, Jan 07 2006

Keywords

Comments

Old name was: Expansion of a q-series.
a(n) is also the number of 2-colored partitions of n with the same number of parts in each color. - Shishuo Fu, May 30 2017
From Gus Wiseman, Mar 25 2021: (Start)
Also the number of even-length compositions of n with alternating parts weakly decreasing. Allowing odd lengths also gives A342528. The version with alternating parts strictly decreasing appears to be A064428. The a(2) = 1 through a(7) = 16 compositions are:
(1,1) (1,2) (1,3) (1,4) (1,5) (1,6)
(2,1) (2,2) (2,3) (2,4) (2,5)
(3,1) (3,2) (3,3) (3,4)
(1,1,1,1) (4,1) (4,2) (4,3)
(1,2,1,1) (5,1) (5,2)
(2,1,1,1) (1,2,1,2) (6,1)
(1,3,1,1) (1,3,1,2)
(2,1,2,1) (1,4,1,1)
(2,2,1,1) (2,2,1,2)
(3,1,1,1) (2,2,2,1)
(1,1,1,1,1,1) (2,3,1,1)
(3,1,2,1)
(3,2,1,1)
(4,1,1,1)
(1,2,1,1,1,1)
(2,1,1,1,1,1)
(End)

Examples

			From _Joerg Arndt_, Jun 10 2013: (Start)
There are a(7)=16 such compositions of 7+2=9 where the maximal part appears twice:
  01:  [ 1 1 1 1 1 2 2 ]
  02:  [ 1 1 1 1 2 2 1 ]
  03:  [ 1 1 1 2 2 1 1 ]
  04:  [ 1 1 1 3 3 ]
  05:  [ 1 1 2 2 1 1 1 ]
  06:  [ 1 1 3 3 1 ]
  07:  [ 1 2 2 1 1 1 1 ]
  08:  [ 1 2 3 3 ]
  09:  [ 1 3 3 1 1 ]
  10:  [ 1 3 3 2 ]
  11:  [ 1 4 4 ]
  12:  [ 2 2 1 1 1 1 1 ]
  13:  [ 2 3 3 1 ]
  14:  [ 3 3 1 1 1 ]
  15:  [ 3 3 2 1 ]
  16:  [ 4 4 1 ]
(End)
		

Crossrefs

Cf. A226541 (max part appears three times), A188674 (max part m appears m times), A001523 (max part appears any number of times).
Column k=2 of A247255.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A000203 adds up divisors.
A002843 counts compositions with all adjacent parts x <= 2y.
A003242 counts anti-run compositions.
A034008 counts even-length compositions.
A065608 counts even-length compositions with alternating parts equal.
A342528 counts compositions with alternating parts weakly decreasing.
A342532 counts even-length compositions with alternating parts unequal.

Programs

  • Mathematica
    max = 50; s = (1+Sum[2*(-1)^k*q^(k(k+1)/2), {k, 1, max}])/QPochhammer[q]^2+ O[q]^max; CoefficientList[s, q] (* Jean-François Alcover, Nov 30 2015, from 1st g.f. *)
    wdw[q_]:=And@@Table[q[[i]]>=q[[i+2]],{i,Length[q]-2}];
    Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n],EvenQ[Length[#]]&],wdw]],{n,0,15}] (* Gus Wiseman, Mar 25 2021 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=0, n\2, x^(2*k) / prod(i=1, k, 1 - x^i, 1 + x * O(x^n))^2), n))};
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( sum(k=1, sqrtint(8*n + 1)\2, 2*(-1)^k * x^((k^2+k)/2), 1 + A) / eta(x + A)^2, n))};

Formula

G.f.: 1 + Sum_{k>0} (x^k / ((1-x)(1-x^2)...(1-x^k)))^2 = (1 + Sum_{k>0} 2 (-1)^k x^((k^2+k)/2) ) / (Product_{k>0} (1 - x^k))^2.
G.f.: 1 + x*(1 - G(0))/(1-x) where G(k) = 1 - x/(1-x^(k+1))^2/(1-x/(x-1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 23 2013
a(n) = A006330(n) - A001523(n). - Vaclav Kotesovec, Jun 22 2015
a(n) ~ Pi * exp(2*Pi*sqrt(n/3)) / (16 * 3^(5/4) * n^(7/4)). - Vaclav Kotesovec, Oct 24 2018

Extensions

New name from Joerg Arndt, Jun 10 2013

A342495 Number of compositions of n with constant (equal) first quotients.

Original entry on oeis.org

1, 1, 2, 4, 5, 6, 8, 10, 10, 11, 12, 12, 16, 16, 18, 20, 19, 18, 22, 22, 24, 28, 24, 24, 30, 27, 30, 30, 34, 30, 38, 36, 36, 36, 36, 40, 43, 40, 42, 46, 48, 42, 52, 46, 48, 52, 48, 48, 56, 55, 54, 54, 58, 54, 60, 58, 64, 64, 60, 60, 72, 64, 68, 74, 69, 72, 72
Offset: 0

Views

Author

Gus Wiseman, Mar 17 2021

Keywords

Comments

The first quotients of a sequence are defined as if the sequence were an increasing divisor chain, so for example the first quotients of (6,3,1) are (1/2,1/3).

Examples

			The composition (1,2,4,8) has first quotients (2,2,2) so is counted under a(15).
The composition (4,5,6) has first quotients (5/4,6/5) so is not counted under a(15).
The a(1) = 1 through a(7) = 10 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (12)   (13)    (14)     (15)      (16)
             (21)   (22)    (23)     (24)      (25)
             (111)  (31)    (32)     (33)      (34)
                    (1111)  (41)     (42)      (43)
                            (11111)  (51)      (52)
                                     (222)     (61)
                                     (111111)  (124)
                                               (421)
                                               (1111111)
		

Crossrefs

The version for differences instead of quotients is A175342.
The unordered version is A342496, ranked by A342522.
The strict unordered version is A342515.
The distinct version is A342529.
A000005 counts constant compositions.
A000009 counts strictly increasing (or strictly decreasing) compositions.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A003238 counts chains of divisors summing to n - 1 (strict: A122651).
A167865 counts strict chains of divisors > 1 summing to n.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],SameQ@@Divide@@@Partition[#,2,1]&]],{n,0,15}]

Formula

a(n > 0) = 2*A342496(n) - A000005(n).

A342529 Number of compositions of n with distinct first quotients.

Original entry on oeis.org

1, 1, 2, 3, 7, 13, 19, 36, 67, 114, 197, 322, 564, 976, 1614, 2729, 4444, 7364, 12357, 20231, 33147, 53973, 87254, 140861, 227535, 368050, 589706, 940999, 1497912, 2378260, 3774297, 5964712, 9416411, 14822087, 23244440, 36420756
Offset: 0

Views

Author

Gus Wiseman, Mar 17 2021

Keywords

Comments

The first quotients of a sequence are defined as if the sequence were an increasing divisor chain, so for example the first quotients of (6,3,1) are (1/2,1/3).

Examples

			The composition (2,1,2,3) has first quotients (1/2,2,3/2) so is counted under a(8).
The a(1) = 1 through a(5) = 13 compositions:
  (1)  (2)    (3)    (4)      (5)
       (1,1)  (1,2)  (1,3)    (1,4)
              (2,1)  (2,2)    (2,3)
                     (3,1)    (3,2)
                     (1,1,2)  (4,1)
                     (1,2,1)  (1,1,3)
                     (2,1,1)  (1,2,2)
                              (1,3,1)
                              (2,1,2)
                              (2,2,1)
                              (3,1,1)
                              (1,1,2,1)
                              (1,2,1,1)
		

Crossrefs

The version for differences instead of quotients is A325545.
The version for equal first quotients is A342495.
The unordered version is A342514, ranked by A342521.
The strict unordered version is A342520.
A000005 counts constant compositions.
A000009 counts strictly increasing (or strictly decreasing) compositions.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A001055 counts factorizations (strict: A045778, ordered: A074206).
A003238 counts chains of divisors summing to n - 1 (strict: A122651).
A167865 counts strict chains of divisors > 1 summing to n.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@Divide@@@Partition[#,2,1]&]],{n,0,15}]

Extensions

a(21)-a(35) from Alois P. Heinz, Jan 16 2025

A342496 Number of integer partitions of n with constant (equal) first quotients.

Original entry on oeis.org

1, 1, 2, 3, 4, 4, 6, 6, 7, 7, 8, 7, 11, 9, 11, 12, 12, 10, 14, 12, 15, 16, 14, 13, 19, 15, 17, 17, 20, 16, 23, 19, 21, 20, 20, 22, 26, 21, 23, 25, 28, 22, 30, 24, 27, 29, 26, 25, 33, 29, 30, 29, 32, 28, 34, 31, 36, 34, 32, 31, 42
Offset: 0

Views

Author

Gus Wiseman, Mar 17 2021

Keywords

Comments

The first quotients of a sequence are defined as if the sequence were an increasing divisor chain, so for example the first quotients of (6,3,1) are (1/2,1/3).

Examples

			The partition (12,6,3) has first quotients (1/2,1/2) so is counted under a(21).
The a(1) = 1 through a(9) = 7 partitions:
  1   2    3     4      5       6        7         8          9
      11   21    22     32      33       43        44         54
           111   31     41      42       52        53         63
                 1111   11111   51       61        62         72
                                222      421       71         81
                                111111   1111111   2222       333
                                                   11111111   111111111
		

Crossrefs

The version for differences instead of quotients is A049988.
The ordered version is A342495.
The distinct version is A342514.
The strict case is A342515.
The Heinz numbers of these partitions are A342522.
A000005 counts constant partitions.
A003238 counts chains of divisors summing to n - 1 (strict: A122651).
A167865 counts strict chains of divisors > 1 summing to n.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],SameQ@@Divide@@@Partition[#,2,1]&]],{n,0,30}]

Formula

a(n > 0) = (A342495(n) + A000005(n))/2.

A342514 Number of integer partitions of n with distinct first quotients.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 6, 8, 11, 14, 18, 24, 28, 35, 41, 52, 64, 81, 93, 115, 137, 157, 190, 225, 268, 313, 366, 430, 502, 587, 683, 790, 913, 1055, 1217, 1393, 1605, 1830, 2098, 2384, 2722, 3101, 3524, 4005, 4524, 5137, 5812, 6570, 7434, 8360, 9416, 10602, 11881
Offset: 0

Views

Author

Gus Wiseman, Mar 17 2021

Keywords

Comments

Also the number of reversed integer partitions of n with distinct first quotients.
The first quotients of a sequence are defined as if the sequence were an increasing divisor chain, so for example the first quotients of (6,3,1) are (1/2,1/3).

Examples

			The partition (4,3,3,2,1) has first quotients (3/4,1,2/3,1/2) so is counted under a(13), but it has first differences (-1,0,-1,-1) so is not counted under A325325(13).
The a(1) = 1 through a(9) = 14 partitions:
  (1)  (2)   (3)   (4)    (5)    (6)    (7)     (8)     (9)
       (11)  (21)  (22)   (32)   (33)   (43)    (44)    (54)
                   (31)   (41)   (42)   (52)    (53)    (63)
                   (211)  (221)  (51)   (61)    (62)    (72)
                          (311)  (321)  (322)   (71)    (81)
                                 (411)  (331)   (332)   (432)
                                        (511)   (422)   (441)
                                        (3211)  (431)   (522)
                                                (521)   (531)
                                                (611)   (621)
                                                (3221)  (711)
                                                        (3321)
                                                        (4311)
                                                        (5211)
		

Crossrefs

The version for differences instead of quotients is A325325.
The ordered version is A342529.
The strict case is A342520.
The Heinz numbers of these partitions are A342521.
A000005 counts constant partitions.
A000009 counts strict partitions.
A000041 counts partitions.
A001055 counts factorizations (strict: A045778, ordered: A074206).
A003238 counts chains of divisors summing to n - 1 (strict: A122651).
A167865 counts strict chains of divisors > 1 summing to n.
A342096 counts partitions with all adjacent parts x < 2y (strict: A342097).
A342098 counts partitions with all adjacent parts x > 2y.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Divide@@@Partition[#,2,1]&]],{n,0,30}]
Showing 1-10 of 22 results. Next