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-4 of 4 results.

A006128 Total number of parts in all partitions of n. Also, sum of largest parts of all partitions of n.

Original entry on oeis.org

0, 1, 3, 6, 12, 20, 35, 54, 86, 128, 192, 275, 399, 556, 780, 1068, 1463, 1965, 2644, 3498, 4630, 6052, 7899, 10206, 13174, 16851, 21522, 27294, 34545, 43453, 54563, 68135, 84927, 105366, 130462, 160876, 198014, 242812, 297201, 362587, 441546, 536104, 649791, 785437, 947812, 1140945, 1371173, 1644136, 1968379, 2351597, 2805218, 3339869, 3970648, 4712040, 5584141, 6606438, 7805507, 9207637
Offset: 0

Views

Author

Keywords

Comments

a(n) = degree of Kac determinant at level n as polynomial in the conformal weight (called h). (Cf. C. Itzykson and J.-M. Drouffe, Statistical Field Theory, Vol. 2, p. 533, eq.(98); reference p. 643, Cambridge University Press, (1989).) - Wolfdieter Lang
Also the number of one-element transitions from the integer partitions of n to the partitions of n-1 for labeled parts with the assumption that from any part z > 1 one can take an element of amount 1 in one way only. That means z is composed of z unlabeled parts of amount 1, i.e. z = 1 + 1 + ... + 1. E.g., for n=3 to n=2 we have a(3) = 6 and [111] --> [11], [111] --> [11], [111] --> [11], [12] --> [11], [12] --> [2], [3] --> [2]. For the case of z composed by labeled elements, z = 1_1 + 1_2 + ... + 1_z, see A066186. - Thomas Wieder, May 20 2004
Number of times a derivative of any order (not 0 of course) appears when expanding the n-th derivative of 1/f(x). For instance (1/f(x))'' = (2 f'(x)^2-f(x) f''(x)) / f(x)^3 which makes a(2) = 3 (by counting k times the k-th power of a derivative). - Thomas Baruchel, Nov 07 2005
Starting with offset 1, = the partition triangle A008284 * [1, 2, 3, ...]. - Gary W. Adamson, Feb 13 2008
Starting with offset 1 equals A000041: (1, 1, 2, 3, 5, 7, 11, ...) convolved with A000005: (1, 2, 2, 3, 2, 4, ...). - Gary W. Adamson, Jun 16 2009
Apart from initial 0 row sums of triangle A066633, also the Möbius transform is A085410. - Gary W. Adamson, Mar 21 2011
More generally, the total number of parts >= k in all partitions of n equals the sum of k-th largest parts of all partitions of n. In this case k = 1. Apart from initial 0 the first column of A181187. - Omar E. Pol, Feb 14 2012
Row sums of triangle A221530. - Omar E. Pol, Jan 21 2013
From Omar E. Pol, Feb 04 2021: (Start)
a(n) is also the total number of divisors of all positive integers in a sequence with n blocks where the m-th block consists of A000041(n-m) copies of m, with 1 <= m <= n. The mentioned divisors are also all parts of all partitions of n.
Apart from initial zero this is also as follows:
Convolution of A000005 and A000041.
Convolution of A006218 and A002865.
Convolution of A341062 and A000070.
Row sums of triangles A221531, A245095, A339258, A340525, A340529. (End)
Number of ways to choose a part index of an integer partition of n, i.e., partitions of n with a selected position. Selecting a part value instead of index gives A000070. - Gus Wiseman, Apr 19 2021

Examples

			For n = 4 the partitions of 4 are [4], [2, 2], [3, 1], [2, 1, 1], [1, 1, 1, 1]. The total number of parts is 12. On the other hand, the sum of the largest parts of all partitions is 4 + 2 + 3 + 2 + 1 = 12, equaling the total number of parts, so a(4) = 12. - _Omar E. Pol_, Oct 12 2018
		

References

  • S. M. Luthra, On the average number of summands in partitions of n, Proc. Nat. Inst. Sci. India Part. A, 23 (1957), p. 483-498.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Main diagonal of A210485.
Column k=1 of A256193.
The version for normal multisets is A001787.
The unordered version is A001792.
The strict case is A015723.
The version for factorizations is A066637.
A000041 counts partitions.
A000070 counts partitions with a selected part.
A336875 counts compositions with a selected part.
A339564 counts factorizations with a selected factor.

Programs

  • GAP
    List([0..60],n->Length(Flat(Partitions(n)))); # Muniru A Asiru, Oct 12 2018
  • Haskell
    a006128 = length . concat . ps 1 where
       ps _ 0 = [[]]
       ps i j = [t:ts | t <- [i..j], ts <- ps t (j - t)]
    -- Reinhard Zumkeller, Jul 13 2013
    
  • Maple
    g:= add(n*x^n*mul(1/(1-x^k), k=1..n), n=1..61):
    a:= n-> coeff(series(g,x,62),x,n):
    seq(a(n), n=0..61);
    # second Maple program:
    a:= n-> add(combinat[numbpart](n-j)*numtheory[tau](j), j=1..n):
    seq(a(n), n=0..61);  # Alois P. Heinz, Aug 23 2019
  • Mathematica
    a[n_] := Sum[DivisorSigma[0, m] PartitionsP[n - m], {m, 1, n}]; Table[ a[n], {n, 0, 41}]
    CoefficientList[ Series[ Sum[n*x^n*Product[1/(1 - x^k), {k, n}], {n, 100}], {x, 0, 100}], x]
    a[n_] := Plus @@ Max /@ IntegerPartitions@ n; Array[a, 45] (* Robert G. Wilson v, Apr 12 2011 *)
    Join[{0}, ((Log[1 - x] + QPolyGamma[1, x])/(Log[x] QPochhammer[x]) + O[x]^60)[[3]]] (* Vladimir Reshetnikov, Nov 17 2016 *)
    Length /@ Table[IntegerPartitions[n] // Flatten, {n, 50}] (* Shouvik Datta, Sep 12 2021 *)
  • PARI
    f(n)= {local(v,i,k,s,t);v=vector(n,k,0);v[n]=2;t=0;while(v[1]1,i--;s+=i*(v[i]=(n-s)\i));t+=sum(k=1,n,v[k]));t } /* Thomas Baruchel, Nov 07 2005 */
    
  • PARI
    a(n) = sum(m=1, n, numdiv(m)*numbpart(n-m)) \\ Michel Marcus, Jul 13 2013
    
  • Python
    from sympy import divisor_count, npartitions
    def a(n): return sum([divisor_count(m)*npartitions(n - m) for m in range(1, n + 1)]) # Indranil Ghosh, Apr 25 2017
    

Formula

G.f.: Sum_{n>=1} n*x^n / Product_{k=1..n} (1-x^k).
G.f.: Sum_{k>=1} x^k/(1-x^k) / Product_{m>=1} (1-x^m).
a(n) = Sum_{k=1..n} k*A008284(n, k).
a(n) = Sum_{m=1..n} of the number of divisors of m * number of partitions of n-m.
Note that the formula for the above comment is a(n) = Sum_{m=1..n} d(m)*p(n-m) = Sum_{m=1..n} A000005(m)*A000041(n-m), if n >= 1. - Omar E. Pol, Jan 21 2013
Erdős and Lehner show that if u(n) denotes the average largest part in a partition of n, then u(n) ~ constant*sqrt(n)*log n.
a(n) = A066897(n) + A066898(n), n>0. - Reinhard Zumkeller, Mar 09 2012
a(n) = A066186(n) - A196087(n), n >= 1. - Omar E. Pol, Apr 22 2012
a(n) = A194452(n) + A024786(n+1). - Omar E. Pol, May 19 2012
a(n) = A000203(n) + A220477(n). - Omar E. Pol, Jan 17 2013
a(n) = Sum_{m=1..p(n)} A194446(m) = Sum_{m=1..p(n)} A141285(m), where p(n) = A000041(n), n >= 1. - Omar E. Pol, May 12 2013
a(n) = A198381(n) + A026905(n), n >= 1. - Omar E. Pol, Aug 10 2013
a(n) = O(sqrt(n)*log(n)*p(n)), where p(n) is the partition function A000041(n). - Peter Bala, Dec 23 2013
a(n) = Sum_{m=1..n} A006218(m)*A002865(n-m), n >= 1. - Omar E. Pol, Jul 14 2014
From Vaclav Kotesovec, Jun 23 2015: (Start)
Asymptotics (Luthra, 1957): a(n) = p(n) * (C*N^(1/2) + C^2/2) * (log(C*N^(1/2)) + gamma) + (1+C^2)/4 + O(N^(-1/2)*log(N)), where N = n - 1/24, C = sqrt(6)/Pi, gamma is the Euler-Mascheroni constant A001620 and p(n) is the partition function A000041(n).
The formula a(n) = p(n) * (sqrt(3*n/(2*Pi)) * (log(n) + 2*gamma - log(Pi/6)) + O(log(n)^3)) in the abstract of the article by Kessler and Livingston (cited also in the book by Sandor, p. 495) is incorrect!
Right is: a(n) = p(n) * (sqrt(3*n/2)/Pi * (log(n) + 2*gamma - log(Pi^2/6)) + O(log(n)^3))
or a(n) ~ exp(Pi*sqrt(2*n/3)) * (log(6*n/Pi^2) + 2*gamma) / (4*Pi*sqrt(2*n)).
(End)
a(n) = Sum_{m=1..n} A341062(m)*A000070(n-m), n >= 1. - Omar E. Pol, Feb 05 2021 2014

A024786 Number of 2's in all partitions of n.

Original entry on oeis.org

0, 1, 1, 3, 4, 8, 11, 19, 26, 41, 56, 83, 112, 160, 213, 295, 389, 526, 686, 911, 1176, 1538, 1968, 2540, 3223, 4115, 5181, 6551, 8191, 10269, 12756, 15873, 19598, 24222, 29741, 36532, 44624, 54509, 66261, 80524, 97446, 117862, 142029, 171036, 205290, 246211
Offset: 1

Views

Author

Keywords

Comments

Also number of partitions of n-1 with a distinguished part different from all the others. [Comment corrected by Emeric Deutsch, Aug 13 2008]
In general the number of times that j appears in the partitions of n equals Sum_{kA024787, ..., A024794, for j = 2,...,10; it generalizes the formula given for A000070 for j=1. - Jose Luis Arregui (arregui(AT)posta.unizar.es), Apr 05 2002
Equals row sums of triangle A173238. - Gary W. Adamson, Feb 13 2010
The sums of two successive terms give A000070. - Omar E. Pol, Jul 12 2012
a(n) is also the difference between the sum of second largest and the sum of third largest elements in all partitions of n. More generally, the number of occurrences of k in all partitions of n equals the difference between the sum of k-th largest and the sum of (k+1)st largest elements in all partitions of n. And more generally, the sum of the number of occurrences of k, k+1, k+2..k+m in all partitions of n equals the difference between the sum of k-th largest and the sum of (k+m+1)st largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012
Number of singletons in all partitions of n-1. A singleton in a partition is a part that occurs exactly once. Example: a(5) = 4 because in the partitions of 4, namely [1,1,1,1], [1,1,2'], [2,2], [1',3'], [4'] we have 4 singletons (marked by '). - Emeric Deutsch, Sep 12 2016
a(n) is also the number of non-isomorphic vertex-transitive cover graphs of lattice quotients of essential lattice congruences of the weak order on the symmetric group S_{n-1}. See Table 1 in the Hoang/Mütze reference in the Links section. - Torsten Muetze, Nov 28 2019
Assuming a partition is in weakly decreasing order, a(n) is also the number of times -1 occurs in the differences of the partitions of n+1. - George Beck, Mar 28 2023

Examples

			From _Omar E. Pol_, Oct 25 2012: (Start)
For n = 7 we have:
--------------------------------------
.                             Number
Partitions of 7               of 2's
--------------------------------------
7 .............................. 0
4 + 3 .......................... 0
5 + 2 .......................... 1
3 + 2 + 2 ...................... 2
6 + 1 .......................... 0
3 + 3 + 1 ...................... 0
4 + 2 + 1 ...................... 1
2 + 2 + 2 + 1 .................. 3
5 + 1 + 1 ...................... 0
3 + 2 + 1 + 1 .................. 1
4 + 1 + 1 + 1 .................. 0
2 + 2 + 1 + 1 + 1 .............. 2
3 + 1 + 1 + 1 + 1 .............. 0
2 + 1 + 1 + 1 + 1 + 1 .......... 1
1 + 1 + 1 + 1 + 1 + 1 + 1 ...... 0
------------------------------------
.  24 - 13 =                    11
.
The difference between the sum of the second column and the sum of the third column of the set of partitions of 7 is 24 - 13 = 11 and equals the number of 2's in all partitions of 7, so a(7) = 11.
(End)
		

References

  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 184.

Crossrefs

Column 2 of A060244.
First differences of A000097.

Programs

  • Maple
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, 0]
        else f:= b(n, i-1); g:= `if`(i>n, [0$2], b(n-i, i));
             [f[1]+g[1], f[2]+g[2]+`if`(i=2, g[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..50);  # Alois P. Heinz, May 18 2012
  • Mathematica
    Table[ Count[ Flatten[ IntegerPartitions[n]], 2], {n, 1, 50} ]
    (* Second program: *)
    b[n_, i_] := b[n, i] = Module[{f, g}, If[n==0 || i==1, {1, 0}, f = b[n, i - 1]; g = If[i>n, {0, 0}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + If[i == 2, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Sep 22 2015, after Alois P. Heinz *)
    Join[{0}, (1/((1 - x^2) QPochhammer[x]) + O[x]^50)[[3]]] (* Vladimir Reshetnikov, Nov 22 2016 *)
    Table[Sum[(1 + (-1)^k)/2 * PartitionsP[n-k], {k, 2, n}], {n, 1, 50}] (* Vaclav Kotesovec, Aug 27 2017 *)
  • Python
    from sympy import npartitions
    def A024786(n): return sum(npartitions(n-(k<<1)) for k in range(1,(n>>1)+1)) # Chai Wah Wu, Oct 25 2023

Formula

a(n) = Sum_{k=1..floor(n/2)} A000041(n-2k). - Christian G. Bower, Jun 22 2000
a(n) = Sum_{kA000041, P(0) = 1. - Jose Luis Arregui (arregui(AT)posta.unizar.es), Apr 05 2002
G.f.: (x^2/((1-x)*(1-x^2)^2))*Product_{j>=3} 1/(1-x^j) from Riordan reference second term, last eq.
a(n) = A006128(n-1) - A194452(n-1). - Omar E. Pol, Nov 20 2011
a(n) = A181187(n,2) - A181187(n,3). - Omar E. Pol, Oct 25 2012
a(n) ~ exp(Pi*sqrt(2*n/3)) / (2^(5/2) * Pi * sqrt(n)) * (1 - 25*Pi/(24*sqrt(6*n)) + (25/48 + 433*Pi^2/6912)/n). - Vaclav Kotesovec, Mar 07 2016, extended Nov 05 2016
a(n) = Sum_{k} k * A116595(n-1,k). - Emeric Deutsch, Sep 12 2016
G.f.: x^2/((1 - x)*(1 - x^2)) * Sum_{n >= 0} x^(2*n)/( Product_{k = 1..n} 1 - x^k ); that is, convolution of A004526 (partitions into 2 parts, or, modulo offset differences, partitions into parts <= 2) and A002865 (partitions into parts >= 2). - Peter Bala, Jan 17 2021

A194544 Total sum of repeated parts in all partitions of n.

Original entry on oeis.org

0, 0, 2, 3, 10, 14, 33, 46, 87, 125, 208, 291, 461, 633, 942, 1292, 1851, 2491, 3484, 4629, 6321, 8326, 11143, 14513, 19168, 24720, 32185, 41193, 53030, 67297, 85830, 108116, 136651, 171040, 214462, 266731, 332197, 410730, 508201, 625082, 768920, 940938
Offset: 0

Views

Author

Omar E. Pol, Nov 19 2011

Keywords

Examples

			For n = 6 we have:
--------------------------------------
.                          Sum of
Partitions             repeated parts
--------------------------------------
6 .......................... 0
3 + 3 ...................... 6
4 + 2 ...................... 0
2 + 2 + 2 .................. 6
5 + 1 ...................... 0
3 + 2 + 1 .................. 0
4 + 1 + 1 .................. 2
2 + 2 + 1 + 1 .............. 6
3 + 1 + 1 + 1 .............. 3
2 + 1 + 1 + 1 + 1 .......... 4
1 + 1 + 1 + 1 + 1 + 1 ...... 6
--------------------------------------
Total ..................... 33
So a(6) = 33.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local h, j, t;
          if n<0 then [0, 0]
        elif n=0 then [1, 0]
        elif i<1 then [0, 0]
        else h:= [0, 0];
             for j from 0 to iquo(n, i) do
               t:= b(n-i*j, i-1);
               h:= [h[1]+t[1], h[2]+t[2]+`if`(j<2, 0, t[1]*i*j)]
             od; h
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=0..50); # Alois P. Heinz, Nov 20 2011
  • Mathematica
    b[n_, i_] := b[n, i] = Module[{h, j, t}, Which [n<0, {0, 0}, n==0, {1, 0}, i<1, {0, 0}, True, h = {0, 0}; For[j=0, j <= Quotient[n, i], j++, t = b[n - i*j, i-1]; h = {h[[1]] + t[[1]], h[[2]] + t[[2]] + If[j<2, 0, t[[1]]* i*j]}]; h]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jan 15 2016, after Alois P. Heinz *)
    Table[Total[Flatten[Select[Flatten[Split/@IntegerPartitions[n],1], Length[ #]> 1&]]],{n,0,50}] (* Harvey P. Dale, Jan 24 2019 *)

Formula

a(n) = A066186(n) - A103628(n), n >= 1.
a(n) ~ exp(sqrt(2*n/3)*Pi) * (1/(4*sqrt(3))-3*sqrt(3)/(8*Pi^2)) * (1 - Pi*(135+2*Pi^2)/(24*(2*Pi^2-9)*sqrt(6*n))). - Vaclav Kotesovec, Nov 05 2016

Extensions

More terms from Alois P. Heinz, Nov 20 2011

A264405 Triangle read by rows: T(n,k) is the number of integer partitions of n having k repeated parts (each occurrence is counted).

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, Dec 07 2015

Keywords

Comments

Compare with A264052 where only one occurrence of a repeated part is counted.
Sum of entries in row n = number of partitions of n = A000041(n).
Sum_{k>=0} k*T(n,k) = A194452(n).

Examples

			T(4,2) = 2 because each of the partitions [2,2] and [2,1,1] have 2 repeated parts, while [4], [3,1], [1,1,1,1] have 0 or 4 repeated parts.
Triangle starts:
  1;
  1, 0;
  1, 0, 1;
  2, 0, 0, 1;
  2, 0, 2, 0, 1;
  3, 0, 2, 1, 0, 1;
		

Crossrefs

Programs

  • Maple
    g := product(1+x^j+t^2*x^(2*j)/(1-t*x^j), j = 1 .. 100): gser := simplify(series(g, x = 0, 30)): for n from 0 to 20 do P[n] := sort(coeff(gser, x, n)) end do: for n from 0 to 20 do seq(coeff(P[n], t, k), k = 0 .. n) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(expand(b(n-i*j, i-1)*`if`(j>1, x^j, 1)), j=0..n/i)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2)):
    seq(T(n), n=0..14);  # Alois P. Heinz, Dec 07 2015
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[Expand[b[n - i*j, i - 1]*If[j > 1, x^j, 1]], {j, 0, n/i}]]]; T[n_] := Function[p, Table[ Coefficient[p, x, i], {i, 0, n}]][b[n, n]]; Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Jan 23 2016, after Alois P. Heinz *)

Formula

G.f.: G(t,x) = Product_{j>=1}(1 + x^j + t^2*x^{2j}/(1 - tx^j)).
Showing 1-4 of 4 results.