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

A352874 Heinz numbers of integer partitions with positive crank, counted by A001522.

Original entry on oeis.org

3, 5, 7, 9, 11, 13, 15, 17, 18, 19, 21, 23, 25, 27, 29, 30, 31, 33, 35, 37, 39, 41, 42, 43, 45, 47, 49, 50, 51, 53, 54, 55, 57, 59, 61, 63, 65, 66, 67, 69, 70, 71, 73, 75, 77, 78, 79, 81, 83, 85, 87, 89, 90, 91, 93, 95, 97, 98, 99, 101, 102, 103, 105, 107, 109
Offset: 1

Views

Author

Gus Wiseman, Apr 09 2022

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
The crank of a partition p is defined to be (i) the largest part of p if there is no 1 in p and (ii) (the number of parts larger than the number of 1's) minus (the number of 1's). [Definition copied from A342192; see A064428 for a different wording.]

Examples

			The terms together with their prime indices begin:
      3: (2)         30: (3,2,1)     54: (2,2,2,1)
      5: (3)         31: (11)        55: (5,3)
      7: (4)         33: (5,2)       57: (8,2)
      9: (2,2)       35: (4,3)       59: (17)
     11: (5)         37: (12)        61: (18)
     13: (6)         39: (6,2)       63: (4,2,2)
     15: (3,2)       41: (13)        65: (6,3)
     17: (7)         42: (4,2,1)     66: (5,2,1)
     18: (2,2,1)     43: (14)        67: (19)
     19: (8)         45: (3,2,2)     69: (9,2)
     21: (4,2)       47: (15)        70: (4,3,1)
     23: (9)         49: (4,4)       71: (20)
     25: (3,3)       50: (3,3,1)     73: (21)
     27: (2,2,2)     51: (7,2)       75: (3,3,2)
     29: (10)        53: (16)        77: (5,4)
		

Crossrefs

* = unproved
These partitions are counted by A001522.
The case of zero crank is A342192, counted by A064410.
The case of nonnegative crank is A352873, counted by A064428.
A000700 counts self-conjugate partitions, ranked by A088902.
A001222 counts prime indices, distinct A001221.
*A001522 counts partitions with a fixed point, ranked by A352827.
A056239 adds up prime indices, row sums of A112798 and A296150.
*A064428 counts partitions without a fixed point, ranked by A352826.
A115720 and A115994 count partitions by their Durfee square.
A122111 represents partition conjugation using Heinz numbers.
A238395 counts reversed partitions with a fixed point, ranked by A352872.

Programs

  • Mathematica
    ck[y_]:=With[{w=Count[y,1]},If[w==0,Max@@y,Count[y,_?(#>w&)]-w]];
    Select[Range[100],ck[Reverse[Flatten[Cases[FactorInteger[#],{p_,k_}:>Table[PrimePi[p],{k}]]]]]>0&]

Formula

Complement of A342192 in A352873.

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

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

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

A238394 Number of partitions of n that sorted in increasing order do not contain a part k in position k.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 3, 3, 4, 5, 8, 9, 12, 13, 17, 22, 28, 34, 42, 48, 59, 71, 88, 106, 130, 151, 181, 210, 250, 295, 354, 417, 494, 577, 675, 780, 909, 1053, 1231, 1431, 1668, 1930, 2240, 2573, 2963, 3392, 3896, 4461, 5129, 5873, 6742, 7710, 8816, 10043, 11439
Offset: 0

Views

Author

Giovanni Resta, Feb 26 2014

Keywords

Comments

The definition forbids partitions with a part equal to 1, so the smallest possible part is 2, which however can appear at most once.
Note that considering partitions in standard decreasing order, we obtain A064428.

Examples

			a(6) = 3, because of the 11 partitions of 6 only 3 do not contain a 1 in position 1, a 2 in position 2, or a 3 in position 3, namely (3,3), (2,4) and (6).
From _Joerg Arndt_, Mar 23 2014: (Start)
There are a(15) = 22 such partitions of 15:
01:  [ 2 3 4 6 ]
02:  [ 2 3 5 5 ]
03:  [ 2 3 10 ]
04:  [ 2 4 4 5 ]
05:  [ 2 4 9 ]
06:  [ 2 5 8 ]
07:  [ 2 6 7 ]
08:  [ 2 13 ]
09:  [ 3 3 4 5 ]
10:  [ 3 3 9 ]
11:  [ 3 4 8 ]
12:  [ 3 5 7 ]
13:  [ 3 6 6 ]
14:  [ 3 12 ]
15:  [ 4 4 7 ]
16:  [ 4 5 6 ]
17:  [ 4 11 ]
18:  [ 5 5 5 ]
19:  [ 5 10 ]
20:  [ 6 9 ]
21:  [ 7 8 ]
22:  [ 15 ]
(End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
          `if`(i<1, 0, b(n, i-1)+`if`(i>n, 0, (p-> expand(
           x*(p-coeff(p, x, i-1)*x^(i-1))))(b(n-i, i)))))
        end:
    a:= n-> (p-> add(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
    seq(a(n), n=0..70);  # Alois P. Heinz, Feb 26 2014
  • Mathematica
    a[n_] := Length@ Select[ IntegerPartitions@n, 0 < Min@ Abs[ Reverse@# - Range@ Length@#] &]; Array[a, 30]
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, Function[p, Expand[x*(p-Coefficient[p, x, i-1]*x^(i-1))]][b[n-i, i]]]]]; a[n_] := Function[p, Sum[Coefficient[p, x, i], {i, 0, Exponent[p, x]} ] ][b[n, n]]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Nov 02 2015, after Alois P. Heinz *)

Formula

a(n) + A238395(n) = p(n) = A000041(n).
a(n) = Sum_{k>=0} A238406(n,k). - Alois P. Heinz, Feb 26 2014
a(n) = A238352(n,0). - Alois P. Heinz, Jun 08 2014

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

A352822 Number of fixed points y(i) = i, where y is the weakly increasing sequence of prime indices of n.

Original entry on oeis.org

0, 1, 0, 1, 0, 2, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, 1, 1, 0, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 2, 1, 0, 1, 0, 2, 0, 1, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 1, 1, 2, 0, 2, 0, 1, 0
Offset: 1

Views

Author

Gus Wiseman, Apr 05 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 6500 are {1,1,3,3,3,6} with fixed points at positions {1,3,6}, so a(6500) = 3.
		

Crossrefs

* = unproved
Positions of first appearances are A002110.
The triangle version is A238352.
Positions of 0's are A352830, counted by A238394.
Positions of 1's are A352831, counted by A352832.
A version for compositions is A352512, complement A352513, triangle A238349.
The complement is A352823.
The reverse version is A352824, complement A352825.
A000700 counts self-conjugate partitions, ranked by A088902.
A001222 counts prime indices, distinct A001221.
*A001522 counts partitions with a fixed point, ranked by A352827.
A056239 adds up prime indices, row sums of A112798 and A296150.
*A064428 counts partitions without a fixed point, ranked by A352826.
A122111 represents partition conjugation using Heinz numbers.
A124010 gives prime signature, sorted A118914, conjugate rank A238745.
A115720 and A115994 count partitions by their Durfee square.
A238395 counts reversed partitions with a fixed point, ranked by A352872.

Programs

  • Maple
    f:= proc(n) local F,J,t;
      F:= sort(ifactors(n)[2],(s,t) -> s[1] numtheory:-pi(t[1])$t[2], F);
      nops(select(t -> J[t]=t, [$1..nops(J)]));
    end proc:
    map(f, [$1..200]); # Robert Israel, Apr 11 2023
  • Mathematica
    pq[y_]:=Length[Select[Range[Length[y]],#==y[[#]]&]];
    Table[pq[Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]],{n,100}]
  • PARI
    A352822(n) = { my(f=factor(n),i=0,c=0); for(k=1,#f~,while(f[k,2], f[k,2]--; i++; c += (i==primepi(f[k,1])))); (c); }; \\ Antti Karttunen, Apr 11 2022

Formula

a(n) = A001222(n) - A352823(n). - Antti Karttunen, Apr 11 2022

Extensions

Data section extended up to 105 terms by Antti Karttunen, Apr 11 2022

A352827 Heinz numbers of integer partitions y with a fixed point y(i) = i. Such a fixed point is unique if it exists.

Original entry on oeis.org

2, 4, 8, 9, 15, 16, 18, 21, 27, 30, 32, 33, 36, 39, 42, 45, 51, 54, 57, 60, 63, 64, 66, 69, 72, 78, 81, 84, 87, 90, 93, 99, 102, 108, 111, 114, 117, 120, 123, 125, 126, 128, 129, 132, 135, 138, 141, 144, 153, 156, 159, 162, 168, 171, 174, 175, 177, 180, 183
Offset: 1

Views

Author

Gus Wiseman, Apr 06 2022

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.

Examples

			The terms together with their prime indices begin:
    2: (1)
    4: (1,1)
    8: (1,1,1)
    9: (2,2)
   15: (3,2)
   16: (1,1,1,1)
   18: (2,2,1)
   21: (4,2)
   27: (2,2,2)
   30: (3,2,1)
   32: (1,1,1,1,1)
   33: (5,2)
   36: (2,2,1,1)
   39: (6,2)
   42: (4,2,1)
   45: (3,2,2)
   51: (7,2)
   54: (2,2,2,1)
For example, the partition (3,2,2) with Heinz number 45 has a fixed point at position 2, so 45 is in the sequence.
		

Crossrefs

* = unproved
*These partitions are counted by A001522, strict A352829.
*The complement is A352826, counted by A064428.
The complement reverse version is A352830, counted by A238394.
The reverse version is A352872, counted by A238395
A000700 counts self-conjugate partitions, ranked by A088902.
A001222 counts prime indices, distinct A001221.
A008290 counts permutations by fixed points, unfixed A098825.
A056239 adds up prime indices, row sums of A112798 and A296150.
A115720 and A115994 count partitions by their Durfee square.
A122111 represents partition conjugation using Heinz numbers.
A124010 gives prime signature, sorted A118914, conjugate rank A238745.
A238349 counts compositions by fixed points, complement A352523.
A238352 counts reversed partitions by fixed points, rank statistic A352822.
A352828 counts strict partitions without a fixed point.
A352833 counts partitions by fixed points.

Programs

  • Mathematica
    pq[y_]:=Length[Select[Range[Length[y]],#==y[[#]]&]];
    Select[Range[100],pq[Reverse[Flatten[Cases[FactorInteger[#],{p_,k_}:>Table[PrimePi[p],{k}]]]]]==1&]

A238395 Number of partitions of n that sorted in increasing order contain a part k in position k for some k.

Original entry on oeis.org

0, 1, 1, 2, 4, 5, 8, 12, 18, 25, 34, 47, 65, 88, 118, 154, 203, 263, 343, 442, 568, 721, 914, 1149, 1445, 1807, 2255, 2800, 3468, 4270, 5250, 6425, 7855, 9566, 11635, 14103, 17068, 20584, 24784, 29754, 35670, 42653, 50934, 60688, 72212, 85742, 101662, 120293
Offset: 0

Views

Author

Giovanni Resta, Feb 26 2014

Keywords

Comments

Note that considering partitions in standard decreasing order, we obtain A001522.

Examples

			a(6) = 11 - 3 = 8, because of the 11 partitions of 6 only 3 do not contain a 1 in position 1, a 2 in position 2, or a 3 in position 3, namely (3,3), (2,4) and (6).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [0, 1],
          `if`(i<1, [0$2], b(n, i-1) +`if`(i>n, 0,
          (p->[p[1] +coeff(p[2], x, i-1), expand(x*(p[2]-
           coeff(p[2], x, i-1)*x^(i-1)))])(b(n-i, i)))))
        end:
    a:= n-> b(n$2)[1]:
    seq(a(n), n=0..70);  # Alois P. Heinz, Feb 26 2014
  • Mathematica
    a[n_] := Length@ Select[IntegerPartitions@ n, MemberQ[ Reverse@# - Range@ Length@#, 0] &]; Array[a, 30]
    (* Second program: *)
    b[n_, i_] := b[n, i] = If[n==0, {0, 1}, If[i<1, {0, 0}, b[n, i-1] + If[i>n, 0, Function[p, {p[[1]] + Coefficient[p[[2]], x, i-1], x*(p[[2]] - Coefficient[p[[2]], x, i-1]*x^(i-1))}][b[n-i, i]]]]]; a[n_] := b[n, n][[1]]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Aug 29 2016, after Alois P. Heinz *)

Formula

a(n) + A238394(n) = p(n) = A000041(n).
Showing 1-10 of 59 results. Next