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

A000070 a(n) = Sum_{k=0..n} p(k) where p(k) = number of partitions of k (A000041).

Original entry on oeis.org

1, 2, 4, 7, 12, 19, 30, 45, 67, 97, 139, 195, 272, 373, 508, 684, 915, 1212, 1597, 2087, 2714, 3506, 4508, 5763, 7338, 9296, 11732, 14742, 18460, 23025, 28629, 35471, 43820, 53963, 66273, 81156, 99133, 120770, 146785, 177970, 215308, 259891, 313065, 376326, 451501
Offset: 0

Views

Author

Keywords

Comments

Also the total number of all different integers in all partitions of n + 1. E.g., a(3) = 7 because the partitions of 4 comprise the sets {1},{1, 2},{2},{1, 3},{4} of different integers and their total number is 7. - Thomas Wieder, Apr 10 2004
With offset 1, also the number of 1's in all partitions of n. For example, 3 = 2+1 = 1+1+1, a(3) = (zero 1's) + (one 1's) + (three 1's), so a(3) = 4. - Naohiro Nomoto, Jan 09 2002. See the Riordan reference p. 184, last formula, first term, for a proof based on Fine's identity given in Riordan, p. 182 (20).
Also, number of partitions of n into parts when there are two kinds of parts of size one.
Also number of graphical forest partitions of 2n+2.
a(n) = count 2 for each partition of n and 1 for each decrement. E.g., the partitions of 4 are 4 (2), 31 (3), 22 (2), 211 (3) and 1111 (2). 2 + 3 + 2 + 3 + 2 = 12. This is related to the Ferrers representation. We can see that taking the Ferrers diagram for each partition of n and adding a new * to all available columns, we generate each partition of n+1, but with repeats (A058884). - Jon Perry, Feb 06 2004
Also the number of 1-transitions among all integer partitions of n. A 1-transition is the removal of a digit "1" from a partition containing at least one "1" and subsequent addition of that "1" to another digit in that partition. This other digit may be a "1" also, but all digits of equal amount are considered as undistinquishable (unlabeled). E.g., for n=6 one has the partition [1113] for which the following two 1-transitions are possible: [1113] --> [123] and [1113] --> [114]. The 1-transitions of n form a partial order (poset). For n=6 one has 12 1-transitions: [111111] --> [11112], [11112] --> [1113], [11112] --> [1122], [1113] --> [114], [1113] --> [123], [1122] --> [123], [1122] --> [222], [123] --> [33], [123] --> [24], [114] --> [15], [114] --> [24], [15] --> [6]. - Thomas Wieder, Mar 08 2005
Also number of partitions of 2n+1 where one of the parts is greater than n (also where there are more than n parts) and of 2n+2 where one of the parts is greater than n+1 (or with more than n+1 parts). - Henry Bottomley, Aug 01 2005
Equals left border of triangle A137633 - Gary W. Adamson, Jan 31 2008
Equals row sums of triangle A027293. - Gary W. Adamson, Oct 26 2008
Convolved with A010815 = [1,1,1,...]. n-th partial sum of A000041 convolved with A010815 = the binomial sequence starting (1, n, ...). - Gary W. Adamson, Nov 09 2008
Equals A036469 convolved with A035363. - Gary W. Adamson, Jun 09 2009
a(A004526(n)) = A025065(n). - Reinhard Zumkeller, Jan 23 2010
a(n) = if n <= 1 then A054225(1,n) else A054225(n,1). - Reinhard Zumkeller, Nov 30 2011
Also the total number of 1's among all hook-lengths in all partitions of n. E.g., a(4)=7 because hooks of the partitions of n = 4 comprise the multisets {4,3,2,1}, {4,2,1,1}, {3,2,2,1}, {4,1,2,1}, {4,3,2,1} and their total number of 1's is 7. - T. Amdeberhan, Jun 03 2012
With offset 1, a(n) is also the difference between the sum of largest and the sum of second 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
a(0) = 1 and 2*a(n-1) >= a(n) for all n > 0. Hence a(n) is a complete sequence. - Frank M Jackson, Apr 08 2013
a(n) is the number of conjugacy classes in the order-preserving, order-decreasing and (order-preserving and order-decreasing) injective transformation semigroups. - Ugbene Ifeanyichukwu, Jun 03 2015
a(n) is also the number of unlabeled subgraphs of the n-cycle C_n. For example, for n = 3, there are 3 unlabeled subgraphs of the triangle C_3 with 0 edges, 2 with 1 edge, 1 with 2 edges, and 1 with 3 edges (C_3 itself), so a(3) = 3 + 2 + 1 + 1 = 7. - John P. McSorley, Nov 21 2016
a(n) is also the number of partitions of 2n with all parts either even or equal to 1. Proof: the number of such partitions of 2n with exactly 2k 1's is p(n-k), for k = 0,..,n. Summing over k gives the formula. - Leonard Chastkofsky, Jul 24 2018
a(n) is the total number of polygamma functions that appear in the expansion of the (n+1)st derivative of x! with respect to x. More specifically, a(n) is the number of times the string "PolyGamma" appears in the expansion of D[x!, {x, n + 1}] in Mathematica. For example, D[x!, {x, 3 + 1}] = Gamma[1 + x] PolyGamma[0, 1 + x]^4 + 6 Gamma[1 + x] PolyGamma[0, 1 + x]^2 PolyGamma[1, 1 + x] + 3 Gamma[1 + x] PolyGamma[1, 1 + x]^2 + 4 Gamma[1 + x] PolyGamma[0, 1 + x] PolyGamma[2, 1 + x] + Gamma[1 + x] PolyGamma[3, 1 + x], and we see that the string "PolyGamma" appears a total of a(3) = 7 times in this expansion. - John M. Campbell, Aug 11 2018
With offset 1, also the number of integer partitions of 2n that do not comprise the multiset of vertex-degrees of any multigraph (i.e., non-multigraphical partitions); see A209816 for multigraphical partitions. - Gus Wiseman, Oct 26 2018
Also a(n) is the number of partitions of 2n+1 with exactly one odd part.
Delete the odd part 2k+1, k=0, ..., n, to get a partition of 2n-2k into even parts. There are as many unrestricted partitions of n-k; now sum those numbers from 0 to n to get a(n). - George Beck, Jul 22 2019
In the Young's lattice, a(n) is the number of branches that connect the (n-1)-th layer to the n-th layer. - Shouvik Datta, Sep 19 2021
a(n) is the number of multiset partitions of the multiset {r^n, s^1}, equivalently, factorization patterns of any number m=p^n*q^1 where p and q are primes. - Joerg Arndt, Jan 01 2024
a(n) is the number of positive integers whose divisors are the parts of the partitions of n + 1. - Omar E. Pol, Nov 07 2024

Examples

			G.f. = 1 + 2*x + 4*x^2 + 7*x^3 + 12*x^4 + 19*x^5 + 30*x^6 + 45*x^7 + 67*x^8 + ...
From _Omar E. Pol_, Oct 25 2012: (Start)
For n = 5 consider the partitions of n+1:
--------------------------------------
.                         Number
Partitions of 6           of 1's
--------------------------------------
6 .......................... 0
3 + 3 ...................... 0
4 + 2 ...................... 0
2 + 2 + 2 .................. 0
5 + 1 ...................... 1
3 + 2 + 1 .................. 1
4 + 1 + 1 .................. 2
2 + 2 + 1 + 1 .............. 2
3 + 1 + 1 + 1 .............. 3
2 + 1 + 1 + 1 + 1 .......... 4
1 + 1 + 1 + 1 + 1 + 1 ...... 6
------------------------------------
35-16 =                     19
.
The difference between the sum of the first column and the sum of the second column of the set of partitions of 6 is 35 - 16 = 19 and equals the number of 1's in all partitions of 6, so the 6th term of this sequence is a(5) = 19.
(End)
From _Gus Wiseman_, Oct 26 2018: (Start)
With offset 1, the a(1) = 1 through a(6) = 19 partitions of 2*n whose greatest part is > n:
  (2)  (4)   (6)    (8)     (A)      (C)
       (31)  (42)   (53)    (64)     (75)
             (51)   (62)    (73)     (84)
             (411)  (71)    (82)     (93)
                    (521)   (91)     (A2)
                    (611)   (622)    (B1)
                    (5111)  (631)    (732)
                            (721)    (741)
                            (811)    (822)
                            (6211)   (831)
                            (7111)   (921)
                            (61111)  (A11)
                                     (7221)
                                     (7311)
                                     (8211)
                                     (9111)
                                     (72111)
                                     (81111)
                                     (711111)
With offset 1, the a(1) = 1 through a(6) = 19 partitions of 2*n whose number of parts is > n:
  (11)  (211)   (2211)    (22211)     (222211)      (2222211)
        (1111)  (3111)    (32111)     (322111)      (3222111)
                (21111)   (41111)     (331111)      (3321111)
                (111111)  (221111)    (421111)      (4221111)
                          (311111)    (511111)      (4311111)
                          (2111111)   (2221111)     (5211111)
                          (11111111)  (3211111)     (6111111)
                                      (4111111)     (22221111)
                                      (22111111)    (32211111)
                                      (31111111)    (33111111)
                                      (211111111)   (42111111)
                                      (1111111111)  (51111111)
                                                    (222111111)
                                                    (321111111)
                                                    (411111111)
                                                    (2211111111)
                                                    (3111111111)
                                                    (21111111111)
                                                    (111111111111)
(End)
From _Joerg Arndt_, Jan 01 2024: (Start)
The a(5) = 19 multiset partitions of the multiset {1^5, 2^1} are:
   1:  {{1, 1, 1, 1, 1, 2}}
   2:  {{1, 1, 1, 1, 1}, {2}}
   3:  {{1, 1, 1, 1, 2}, {1}}
   4:  {{1, 1, 1, 1}, {1, 2}}
   5:  {{1, 1, 1, 1}, {1}, {2}}
   6:  {{1, 1, 1, 2}, {1, 1}}
   7:  {{1, 1, 1, 2}, {1}, {1}}
   8:  {{1, 1, 1}, {1, 1, 2}}
   9:  {{1, 1, 1}, {1, 1}, {2}}
  10:  {{1, 1, 1}, {1, 2}, {1}}
  11:  {{1, 1, 1}, {1}, {1}, {2}}
  12:  {{1, 1, 2}, {1, 1}, {1}}
  13:  {{1, 1, 2}, {1}, {1}, {1}}
  14:  {{1, 1}, {1, 1}, {1, 2}}
  15:  {{1, 1}, {1, 1}, {1}, {2}}
  16:  {{1, 1}, {1, 2}, {1}, {1}}
  17:  {{1, 1}, {1}, {1}, {1}, {2}}
  18:  {{1, 2}, {1}, {1}, {1}, {1}}
  19:  {{1}, {1}, {1}, {1}, {1}, {2}}
(End)
		

References

  • H. Gupta, An asymptotic formula in partitions. J. Indian Math. Soc., (N. S.) 10 (1946), 73-76.
  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.
  • R. Honsberger, Mathematical Gems III, M.A.A., 1985, p. 6.
  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Table A-1, page 778. - N. J. A. Sloane, Dec 30 2018
  • A. M. Odlyzko, Asymptotic Enumeration Methods, p. 19
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
  • 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).
  • Stanley, R. P., Exercise 1.26 in Enumerative Combinatorics, Vol. 1. Cambridge, England: Cambridge University Press, p. 59, 1999.

Crossrefs

A diagonal of A066633.
Also second column of A126442. - George Beck, May 07 2011
Row sums of triangle A092905.
Also row sums of triangle A261555. - Omar E. Pol, Sep 14 2016
Also row sums of triangle A278427. - John P. McSorley, Nov 25 2016
Column k=2 of A292508.

Programs

  • GAP
    List([0..45],n->Sum([0..n],k->NrPartitions(k))); # Muniru A Asiru, Jul 25 2018
    
  • Haskell
    a000070 = p a028310_list where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Nov 06 2012
    
  • Maple
    with(combinat): a:=n->add(numbpart(j),j=0..n): seq(a(n), n=0..44); # Zerinvary Lajos, Aug 26 2008
  • Mathematica
    CoefficientList[ Series[1/(1 - x)*Product[1/(1 - x^k), {k, 75}], {x, 0, 45}], x] (* Robert G. Wilson v, Jul 13 2004 *)
    Table[ Count[ Flatten@ IntegerPartitions@ n, 1], {n, 45}] (* Robert G. Wilson v, Aug 06 2008 *)
    Join[{1}, Accumulate[PartitionsP[Range[50]]]+1] (* _Harvey P. Dale, Mar 12 2013 *)
    a[ n_] := SeriesCoefficient[ 1 / (1 - x) / QPochhammer[ x], {x, 0, n}]; (* Michael Somos, Nov 09 2013 *)
    Accumulate[PartitionsP[Range[0,49]]] (* George Beck, Oct 23 2014; typo fixed by Virgile Andreani, Jul 10 2016 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 / prod(m=1, n, 1 - x^m, 1 + x * O(x^n)) / (1 - x), n))}; /* Michael Somos, Nov 08 2002 */
    
  • PARI
    x='x+O('x^66); Vec(1/((1-x)*eta(x))) /* Joerg Arndt, May 15 2011 */
    
  • PARI
    a(n) = sum(k=0, n, numbpart(k)); \\ Michel Marcus, Sep 16 2016
    
  • Python
    from itertools import accumulate
    def A000070iter(n):
        L = [0]*n; L[0] = 1
        def numpart(n):
            S = 0; J = n-1; k = 2
            while 0 <= J:
                T = L[J]
                S = S+T if (k//2)%2 else S-T
                J -= k  if (k)%2 else k//2
                k += 1
            return S
        for j in range(1, n): L[j] = numpart(j)
        return accumulate(L)
    print(list(A000070iter(100))) # Peter Luschny, Aug 30 2019
    
  • Python
    # Using function A365676Row. Compare also A365675.
    from itertools import accumulate
    def A000070List(size: int) -> list[int]:
        return [sum(accumulate(reversed(A365676Row(n)))) for n in range(size)]
    print(A000070List(45))  # Peter Luschny, Sep 16 2023
  • Sage
    def A000070_list(leng):
        p = [number_of_partitions(n) for n in range(leng)]
        return [add(p[:k+1]) for k in range(leng)]
    A000070_list(45) # Peter Luschny, Sep 15 2014
    

Formula

Euler transform of [ 2, 1, 1, 1, 1, 1, 1, ...].
log(a(n)) ~ -3.3959 + 2.44613*sqrt(n). - Robert G. Wilson v, Jan 11 2002
a(n) = (1/n)*Sum_{k=1..n} (sigma(k)+1)*a(n-k), n > 1, a(0) = 1. - Vladeta Jovovic, Aug 22 2002
G.f.: (1/(1 - x))*Product_{m >= 1} 1/(1 - x^m).
a(n) seems to have the same parity as A027349(n+1). Comment from James Sellers, Mar 08 2006: that is true.
a(n) = A000041(2n+1) - A110618(2n+1) = A000041(2n+2) - A110618(2n+2). - Henry Bottomley, Aug 01 2005
Row sums of triangle A133735. - Gary W. Adamson, Sep 22 2007
a(n) = A092269(n+1) - A195820(n+1). - Omar E. Pol, Oct 20 2011
a(n) = A181187(n+1,1) - A181187(n+1,2). - Omar E. Pol, Oct 25 2012
From Peter Bala, Dec 23 2013: (Start)
Gupta gives the asymptotic result a(n-1) ~ sqrt(6/Pi^2)* sqrt(n)*p(n), where p(n) is the partition function A000041(n).
Let P(2,n) denote the set of partitions of n into parts k >= 2.
a(n-2) = Sum_{parts k in all partitions in P(2,n)} phi(k), where phi(k) is the Euler totient function (see A000010). Using this result and Mertens's theorem on the average order of the phi function, leads to the asymptotic result
a(n-2) ~ (6/Pi^2)*n*(p(n) - p(n-1)) = (6/Pi^2)*A138880(n) as n -> infinity. (End)
a(n) ~ exp(Pi*sqrt(2*n/3)) / (2^(3/2)*Pi*sqrt(n)) * (1 + 11*Pi/(24*sqrt(6*n)) + (73*Pi^2 - 1584)/(6912*n)). - Vaclav Kotesovec, Oct 26 2016
a(n) = A024786(n+2) + A024786(n+1). - Vaclav Kotesovec, Nov 05 2016
G.f.: exp(Sum_{k>=1} (sigma_1(k) + 1)*x^k/k). - Ilya Gutkovskiy, Aug 21 2018
a(n) = A025065(2n). - Gus Wiseman, Oct 26 2018
a(n - 1) = A000041(2n) - A209816(n). - Gus Wiseman, Oct 26 2018

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

A066633 Triangle T(n,k), n >= 1, 1 <= k <= n, giving number of k's in all partitions of n.

Original entry on oeis.org

1, 2, 1, 4, 1, 1, 7, 3, 1, 1, 12, 4, 2, 1, 1, 19, 8, 4, 2, 1, 1, 30, 11, 6, 3, 2, 1, 1, 45, 19, 9, 6, 3, 2, 1, 1, 67, 26, 15, 8, 5, 3, 2, 1, 1, 97, 41, 21, 13, 8, 5, 3, 2, 1, 1, 139, 56, 31, 18, 12, 7, 5, 3, 2, 1, 1, 195, 83, 45, 28, 17, 12, 7, 5, 3, 2, 1, 1, 272, 112, 63, 38, 25, 16, 11, 7, 5, 3, 2, 1, 1
Offset: 1

Views

Author

Naohiro Nomoto, Jan 09 2002

Keywords

Comments

It appears that row n lists the first differences of the row n of triangle A181187 together with 1 (as the final term of the row n). - Omar E. Pol, Feb 26 2012
It appears that reversed rows converge to A000041. - Omar E. Pol, Mar 11 2012
Proof: For a partition of n with k>floor(n/2+1), k can only occur as the largest part; the other parts sum to n-k, so that T(n,n-k)=A000041(k). - George Beck, Jun 30 2019
T(n,k) is also the total number k's that are 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. - Omar E. Pol, Feb 05 2021

Examples

			For n = 3, k = 1; 3 = 2+1 = 1+1+1. T(3,1) = (zero 1's) + (one 1's) + (three 1's), so T(3,1) = 4.
Triangle begins:
    1;
    2,   1;
    4,   1,  1;
    7,   3,  1,  1;
   12,   4,  2,  1,  1;
   19,   8,  4,  2,  1,  1;
   30,  11,  6,  3,  2,  1,  1;
   45,  19,  9,  6,  3,  2,  1, 1;
   67,  26, 15,  8,  5,  3,  2, 1, 1;
   97,  41, 21, 13,  8,  5,  3, 2, 1, 1;
  139,  56, 31, 18, 12,  7,  5, 3, 2, 1, 1;
  195,  83, 45, 28, 17, 12,  7, 5, 3, 2, 1, 1;
  272, 112, 63, 38, 25, 16, 11, 7, 5, 3, 2, 1, 1;
  ...
		

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.2.1.5, Problem 73(b), pp. 415, 761. - N. J. A. Sloane, Dec 30 2018

Crossrefs

Row sums give positive terms of A006128.
Columns (1-10): A000070, A024786-A024794.

Programs

  • Maple
    b:= proc(n, i) option remember;
          `if`(n=0 or i=1, 1+n*x, b(n, i-1)+
          `if`(i>n, 0, (g->g+coeff(g, x, 0)*x^i)(b(n-i, i))))
        end:
    T:= n-> (p->seq(coeff(p, x, i), i=1..n))(b(n, n)):
    seq(T(n), n=1..14);  # Alois P. Heinz, Mar 21 2012
  • Mathematica
    Table[Count[Flatten[IntegerPartitions[n]],k],
    {n,1,20},{k,1,n}]
    TableForm[% ] (* as a triangle *)
    Flatten[%%]   (* as a sequence *)
    (* Clark Kimberling, Mar 03 2010 *)
    T[n_, n_] = 1; T[n_, k_] /; k, ] = 0; Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 21 2015, after Omar E. Pol *)
  • Python
    from math import isqrt, comb
    from sympy import partition
    def A066633(n):
        a = (m:=isqrt(k:=n<<1))+(k>m*(m+1))
        b = n-comb(a,2)
        return sum(partition(j) for j in range(a%b,a,b)) # Chai Wah Wu, Nov 13 2024

Formula

G.f. for the number of k's in all partitions of n is x^k/(1-x^k)* Product_{m>=1} 1/(1-x^m). - Vladeta Jovovic, Jan 15 2002
T(n, k) = Sum_{j
Equals triangle A027293 * A051731 as infinite lower triangular matrices. - Gary W. Adamson Mar 21 2011
It appears that T(n+k,k) = T(n,k) + A000041(n). - Omar E. Pol, Feb 04 2012. This was proved in the Dastidar-Gupta paper in Lemma 1. - George Beck, Jun 26 2019
It appears that T(n,k) = A206563(n,k) - A206563(n,k+2). - Omar E. Pol, Feb 26 2012
T(n,k) = Sum_{j=1..n} A182703(j,k). - Omar E. Pol, May 02 2012

Extensions

More terms from Vladeta Jovovic, Jan 11 2002

A000097 Number of partitions of n if there are two kinds of 1's and two kinds of 2's.

Original entry on oeis.org

1, 2, 5, 9, 17, 28, 47, 73, 114, 170, 253, 365, 525, 738, 1033, 1422, 1948, 2634, 3545, 4721, 6259, 8227, 10767, 13990, 18105, 23286, 29837, 38028, 48297, 61053, 76926, 96524, 120746, 150487, 187019, 231643, 286152, 352413, 432937, 530383, 648245
Offset: 0

Keywords

Comments

Also number of partitions of 2*n with exactly 2 odd parts (offset 1). - Vladeta Jovovic, Jan 12 2005
Also number of transitions from one partition of n+2 to another, where a transition consists of replacing any two parts with their sum. Remove all 1' and 2' from the partition, replacing them with ((number of 2') + 1) and ((number of 1') + (number of 2') + 1); these are the two parts being summed. Number of partitions of n into parts of 2 kinds with at most 2 parts of the second kind, or of n+2 into parts of 2 kinds with exactly 2 parts of the second kind. - Franklin T. Adams-Watters, Mar 20 2006
From Christian Gutschwager (gutschwager(AT)math.uni-hannover.de), Feb 10 2010: (Start)
a(n) is also the number of pairs of partitions of n+2 which differ by only one box (for bijection see the first Gutschwager link).
a(n) is also the number of partitions of n with two parts marked.
a(n) is also the number of partitions of n+1 with two different parts marked. (End)
Convolution of A000041 and A008619. - Vaclav Kotesovec, Aug 18 2015
a(n) = P(/2,n), a particular case of P(/k,n) defined as follows: P(/0,n) = A000041(n) and P(/k,n) = P(/k-1, n) + P(/k-1,n-k) + P(/k-1, n-2k) + ... Also, P(/k,n) = the convolution of A000041 and the partitions of n with exactly k parts, and g.f. P(/k,n) = (g.f. for P(n)) * 1/(1-x)...(1-x^k). - Gregory L. Simay, Mar 22 2018
a(n) is also the sum of binomial(D(p),2) in partitions p of (n+3), where D(p)= number of different sizes of parts in p. - Emily Anible, Apr 03 2018
Also partitions of 2*(n+1) with alternating sum 2. Also partitions of 2*(n+1) with reverse-alternating sum -2 or 2. - Gus Wiseman, Jun 21 2021
Define the distance graph of the partitions of n using the distance function in A366156 as follows: two vertices (partitions) share an edge if and only if the distance between the vertices is 2. Then a(n) is the number of edges in the distance graph of the partitions of n. - Clark Kimberling, Oct 12 2023

Examples

			a(3) = 9 because we have 3, 2+1, 2+1', 2'+1, 2'+1', 1+1+1, 1+1+1', 1+1'+1' and 1'+1'+1'.
From _Gus Wiseman_, Jun 22 2021: (Start)
The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with exactly 2 odd parts:
  (1,1)  (3,1)    (3,3)      (5,3)
         (2,1,1)  (5,1)      (7,1)
                  (3,2,1)    (3,3,2)
                  (4,1,1)    (4,3,1)
                  (2,2,1,1)  (5,2,1)
                             (6,1,1)
                             (3,2,2,1)
                             (4,2,1,1)
                             (2,2,2,1,1)
The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with alternating sum 2:
  (2)  (3,1)    (4,2)        (5,3)
       (2,1,1)  (2,2,2)      (3,3,2)
                (3,2,1)      (4,3,1)
                (3,1,1,1)    (3,2,2,1)
                (2,1,1,1,1)  (4,2,1,1)
                             (2,2,2,1,1)
                             (3,2,1,1,1)
                             (3,1,1,1,1,1)
                             (2,1,1,1,1,1,1)
(End)
		

References

  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
  • 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).

Crossrefs

First differences are in A024786.
Third column of Riordan triangle A008951 and of triangle A103923.
The case of reverse-alternating sum 1 or alternating sum 0 is A000041.
The case of reverse-alternating sum -1 or alternating sum 1 is A000070.
The normal case appears to be A004526 or A065033.
The strict case is A096914.
The case of reverse-alternating sum 2 is A120452.
The case of reverse-alternating sum -2 is A344741.
A001700 counts compositions with alternating sum 2.
A035363 counts partitions into even parts.
A058696 counts partitions of 2n.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A124754 gives alternating sums of standard compositions (reverse: A344618).
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
Shift of A093695.

Programs

  • Maple
    with(numtheory): etr:= proc(p) local b; b:=proc(n) option remember; local d,j; if n=0 then 1 else add(add(d*p(d), d=divisors(j)) *b(n-j), j=1..n)/n fi end end: a:= etr(n->`if`(n<3,2,1)): seq(a(n), n=0..40); # Alois P. Heinz, Sep 08 2008
  • Mathematica
    CoefficientList[Series[1/((1 - x) (1 - x^2) Product[1 - x^k, {k, 1, 100}]), {x, 0, 100}], x] (* Ben Branman, Mar 07 2012 *)
    etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}]*b[n - j], {j, 1, n}]/n]; b]; a = etr[If[# < 3, 2, 1]&]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Apr 09 2014, after Alois P. Heinz *)
    (1/((1 - x) (1 - x^2) QPochhammer[x]) + O[x]^50)[[3]] (* Vladimir Reshetnikov, Nov 22 2016 *)
    Table[Length@IntegerPartitions[n,All,Join[{1,2},Range[n]]],{n,0,15}] (* Robert Price, Jul 28 2020 and Jun 21 2021 *)
    T[n_, 0] := PartitionsP[n];
    T[n_, m_] /; (n >= m (m + 1)/2) := T[n, m] = T[n - m, m - 1] + T[n - m, m];
    T[, ] = 0;
    a[n_] := T[n + 3, 2];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];Table[Length[Select[IntegerPartitions[n],ats[#]==2&]],{n,0,30,2}] (* Gus Wiseman, Jun 21 2021 *)
  • PARI
    my(x = 'x + O('x^66)); Vec( 1/((1-x)*(1-x^2)*eta(x)) ) \\ Joerg Arndt, Apr 29 2013

Formula

Euler transform of 2 2 1 1 1 1 1...
G.f.: 1/( (1-x) * (1-x^2) * Product_{k>=1} (1-x^k) ).
a(n) = Sum_{j=0..floor(n/2)} A000070(n-2*j), n>=0.
a(n) = A014153(n)/2 + A087787(n)/4 + A000070(n)/4. - Vaclav Kotesovec, Nov 05 2016
a(n) ~ sqrt(3) * exp(Pi*sqrt(2*n/3)) / (4*Pi^2) * (1 + 35*Pi/(24*sqrt(6*n))). - Vaclav Kotesovec, Aug 18 2015, extended Nov 05 2016
a(n) = A120452(n) + A344741(n). - Gus Wiseman, Jun 21 2021

Extensions

More terms from Pab Ter (pabrlos(AT)yahoo.com), May 04 2004
Edited by Emeric Deutsch, Mar 23 2005
More terms from Franklin T. Adams-Watters, Mar 20 2006
Edited by Charles R Greathouse IV, Apr 20 2010

A268193 Triangle read by rows: T(n,k) (n>=1, k>=0) is the number of partitions of n which have k distinct parts i such that i+1 is also a part.

Original entry on oeis.org

1, 2, 2, 1, 4, 1, 4, 3, 8, 2, 1, 8, 6, 1, 13, 7, 2, 15, 11, 4, 22, 15, 4, 1, 24, 24, 7, 1, 37, 26, 12, 2, 40, 42, 16, 3, 57, 50, 22, 6, 64, 72, 33, 6, 1, 89, 84, 46, 11, 1, 98, 122, 60, 15, 2, 135, 141, 82, 24, 3, 149, 198, 106, 32, 5, 199, 231, 144, 45, 8, 224, 309, 187, 61, 10, 1
Offset: 1

Author

Emeric Deutsch, Feb 13 2016

Keywords

Comments

T(n,k) = number of partitions of n having k singleton parts other than the largest part. Example: T(5,1) = 3 because we have [4,1'], [3,2'], [2,2,1'] (the counted singletons are marked). These partitions are connected by conjugation to those in the definition.
From Gus Wiseman, Jul 10 2025: (Start)
Also the number of integer partitions of n with k maximal subsequences of consecutive parts not decreasing by 1 (anti-runs). For example, row n = 8 counts partitions with the following anti-runs:
((8)) ((3,3),(2)) ((3),(2,2),(1))
((4,4)) ((4),(3,1)) ((3),(2),(1,1,1))
((5,3)) ((5,2),(1))
((6,2)) ((4,2),(1,1))
((7,1)) ((2,2,2),(1,1))
((4,2,2)) ((2,2),(1,1,1,1))
((6,1,1)) ((2),(1,1,1,1,1,1))
((2,2,2,2))
((3,3,1,1))
((5,1,1,1))
((4,1,1,1,1))
((3,1,1,1,1,1))
((1,1,1,1,1,1,1,1))
(End)

Examples

			T(5,1) = 3 because we have [3,2], [2,2,1], and [2,1,1,1].
T(9,2) = 4 because we have [3,2',1,1,1,1'], [3,2,2',1,1'], [3,3,2',1'], and [4,3',2'] (the i's are marked).
Triangle starts:
  1;
  2;
  2,1;
  4,1;
  4,3;
  8,2,1;
  8,6,1;
From _Gus Wiseman_, Jul 11 2025: (Start)
Row n = 8 counts the following partitions by number of singleton parts other than the largest part:
  (8)                (5,3)        (4,3,1)
  (4,4)              (6,2)        (5,2,1)
  (4,2,2)            (7,1)
  (6,1,1)            (3,3,2)
  (2,2,2,2)          (3,2,2,1)
  (3,3,1,1)          (4,2,1,1)
  (5,1,1,1)          (3,2,1,1,1)
  (2,2,2,1,1)
  (4,1,1,1,1)
  (2,2,1,1,1,1)
  (3,1,1,1,1,1)
  (2,1,1,1,1,1,1)
  (1,1,1,1,1,1,1,1)
(End)
		

Crossrefs

Row sums are A000041.
Row lengths are A003056.
For distinct parts instead of anti-runs we have A116608.
Column k = 1 is A116931.
For runs instead of anti-runs we have A384881.
The strict case is A384905.
The corresponding rank statistic is A356228, non-strict version A384906.
The proper case is A385814, runs A385815.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.

Programs

  • Maple
    g := add(x^j*mul(1+t*x^i+x^(2*i)/(1-x^i), i = 1 .. j-1)/(1-x^j), j = 1 .. 80): gser := simplify(series(g, x = 0, 27)): for n from 0 to 25 do P[n] := sort(coeff(gser, x, n)) end do: for n to 25 do seq(coeff(P[n], t, k), k = 0 .. degree(P[n])) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i, t) option remember; expand(`if`(n=0, 1,
          `if`(i<1, 0, add(b(n-i*j, i-1, t or j>0)*
          `if`(t and j=1, x, 1), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2, false)):
    seq(T(n), n=1..20);  # Alois P. Heinz, Feb 13 2016
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1, t || j > 0]*If[t && j == 1, x, 1], {j, 0, n/i}]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n, False]]; Table[T[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Dec 21 2016, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],Length[Split[#,#1!=#2+1&]]==k&]],{n,0,10},{k,0,n}] (* Delete zeros for A268193. Gus Wiseman, Jul 10 2025 *)

Formula

T(n,0) = A116931(n).
Sum_{k>=1} T(n, k) = A000041(n) (the partition numbers).
Sum_{k>=1} k*T(n,k) = A024786(n-1).
G.f.: G(t,x) = Sum_{j>=1} ((x^j/(1-x^j))*Product_{i=1..j-1} (1 + tx^i + x^{2i}/(1-x^i))).

A182712 Number of 2's in the last section of the set of partitions of n.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 4, 3, 8, 7, 15, 15, 27, 29, 48, 53, 82, 94, 137, 160, 225, 265, 362, 430, 572, 683, 892, 1066, 1370, 1640, 2078, 2487, 3117, 3725, 4624, 5519, 6791, 8092, 9885, 11752, 14263, 16922, 20416, 24167, 29007, 34254, 40921, 48213, 57345, 67409
Offset: 0

Author

Omar E. Pol, Nov 28 2010

Keywords

Comments

Essentially the same as A087787 but here a(n) is the number of 2's in the last section of n, not n-2. See also A100818.
Note that a(1)..a(11) coincide with a(2)..a(12) of A005291.
Also number of 2's in all partitions of n that do not contain 1's as a part, if n >= 1. Also 0 together with the first differences of A024786. - Omar E. Pol, Nov 13 2011
Also number of 2's in the n-th section of the set of partitions of any integer >= n. For the definition of "section" see A135010. - Omar E. Pol, Dec 01 2013

Examples

			a(6) = 4 counts the 2's in 6 = 4+2 = 2+2+2. The 2's in 6 = 3+2+1 = 2+2+1+1 = 2+1+1+1+1 do not count. - _Omar E. Pol_, Nov 13 2011
From _Omar E. Pol_, Oct 27 2012: (Start)
----------------------------------
Last section               Number
of the set of                of
partitions of 6             2's
----------------------------------
6 .......................... 0
3 + 3 ...................... 0
4 + 2 ...................... 1
2 + 2 + 2 .................. 3
.   1 ...................... 0
.       1 .................. 0
.       1 .................. 0
.           1 .............. 0
.           1 .............. 0
.               1 .......... 0
.                   1 ...... 0
---------------------------------
.   8 - 4 =                  4
.
In the last section of the set of partitions of 6 the difference between the sum of the second column and the sum of the third column is 8 - 4 = 4, the same as the number of 2's, so a(6) = 4 (see also A024786).
(End)
		

Crossrefs

Programs

  • Mathematica
    Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], 2], {n, 0, 49}] (* Robert Price, May 15 2020 *)
  • Sage
    A182712 = lambda n: sum(list(p).count(2) for p in Partitions(n) if 1 not in p) # Omar E. Pol, Nov 13 2011

Formula

It appears that A000041(n) = a(n+1) + a(n+2), n >= 0. - Omar E. Pol, Feb 04 2012
G.f.: (x^2/(1 + x))*Product_{k>=1} 1/(1 - x^k). - Ilya Gutkovskiy, Jan 03 2017
a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*sqrt(3)*n). - Vaclav Kotesovec, Jun 02 2018

A087787 a(n) = Sum_{k=0..n} (-1)^(n-k)*A000041(k).

Original entry on oeis.org

1, 0, 2, 1, 4, 3, 8, 7, 15, 15, 27, 29, 48, 53, 82, 94, 137, 160, 225, 265, 362, 430, 572, 683, 892, 1066, 1370, 1640, 2078, 2487, 3117, 3725, 4624, 5519, 6791, 8092, 9885, 11752, 14263, 16922, 20416, 24167, 29007, 34254, 40921, 48213, 57345, 67409
Offset: 0

Author

Vladeta Jovovic, Oct 07 2003

Keywords

Comments

Essentially first differences of A024786 (see the formula). Also, a(n) is the number of 2's in the last section of the set of partitions of n+2 (see A135010). - Omar E. Pol, Sep 10 2008
From Gus Wiseman, May 20 2024: (Start)
Also the number of integer partitions of n containing an even number of ones, ranked by A003159. The a(0) = 1 through a(8) = 15 partitions are:
() . (2) (3) (4) (5) (6) (7) (8)
(11) (22) (32) (33) (43) (44)
(211) (311) (42) (52) (53)
(1111) (222) (322) (62)
(411) (511) (332)
(2211) (3211) (422)
(21111) (31111) (611)
(111111) (2222)
(3311)
(4211)
(22211)
(41111)
(221111)
(2111111)
(11111111)
Also the number of integer partitions of n + 1 containing an odd number of ones, ranked by A036554.
(End)

Crossrefs

The unsigned version is A000070, strict A036469.
For powers of 2 instead number of partitions we have A001045.
The strict or odd version is A025147 or A096765.
The ordered version (compositions instead of partitions) is A078008.
For powers of 2 instead of -1 we have A259401, cf. A259400.
A002865 counts partitions with no ones, column k=0 of A116598.
A072233 counts partitions by sum and length.

Programs

  • Mathematica
    Table[Sum[(-1)^(n-k)*PartitionsP[k], {k,0,n}], {n,0,50}] (* Vaclav Kotesovec, Aug 16 2015 *)
    (* more efficient program *) sig = 1; su = 1; Flatten[{1, Table[sig = -sig; su = su + sig*PartitionsP[n]; Abs[su], {n, 1, 50}]}] (* Vaclav Kotesovec, Nov 06 2016 *)
    Table[Length[Select[IntegerPartitions[n], EvenQ[Count[#,1]]&]],{n,0,30}] (* Gus Wiseman, May 20 2024 *)
  • Python
    from sympy import npartitions
    def A087787(n): return sum(-npartitions(k) if n-k&1 else npartitions(k) for k in range(n+1)) # Chai Wah Wu, Oct 25 2023

Formula

G.f.: 1/(1+x)*1/Product_{k>0} (1-x^k).
a(n) = 1/n*Sum_{k=1..n} (sigma(k)+(-1)^k)*a(n-k).
a(n) = A024786(n+2)-A024786(n+1). - Omar E. Pol, Sep 10 2008
a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*sqrt(3)*n) * (1 + (11*Pi/(24*sqrt(6)) - sqrt(3/2)/Pi)/sqrt(n) - (11/16 + (23*Pi^2)/6912)/n). - Vaclav Kotesovec, Nov 05 2016
a(n) = A000041(n) - a(n-1). - Jon Maiga, Aug 29 2019
Alternating partial sums of A000041. - Gus Wiseman, May 20 2024

A024788 Number of 4's in all partitions of n.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 6, 8, 13, 18, 28, 38, 55, 74, 105, 139, 190, 250, 336, 436, 575, 740, 963, 1228, 1577, 1995, 2538, 3186, 4013, 5005, 6256, 7751, 9617, 11847, 14605, 17894, 21927, 26730, 32582, 39531, 47942, 57915, 69920, 84114, 101116, 121176, 145095, 173248
Offset: 1

Keywords

Comments

The sums of four successive terms give A000070. - Omar E. Pol, Jul 12 2012
a(n) is also the difference between the sum of 4th largest and the sum of 5th largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012
a(n+4) is the number of n-vertex graphs that do not contain a triangle, P_4, or K_2,3 as induced subgraph. These are the K_2,3-free bipartite cographs. Bipartite cographs are graph that are disjoint unions of complete bipartite graphs [Babel et al. Corollary 2.2], and forbidding K_2,3 leaves one possible component for each size except size 4, where there are two. Thus, this number is A000041(n) + a(n) = a(n+4). - Falk Hüffner, Jan 11 2016
a(n) (n>=3) is the number of even singletons in all partitions of n-2 (by a singleton we mean a part that occurs exactly once). Example: a(7) = 3 because in the partitions [5], [4*,1], [3,2*], [3,1,1], [2,2,1], [2*,1,1,1], [1,1,1,1,1] we have 3 even singletons (marked by *). The statement of this comment can be obtained by setting k=2 in Theorem 2 of the Andrews et al. reference. - Emeric Deutsch, Sep 13 2016

Examples

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

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=4, g[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 27 2012
  • Mathematica
    Table[ Count[ Flatten[ IntegerPartitions[n]], 4], {n, 1, 50} ]
    (* second program: *)
    b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 4, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)

Formula

a(n) = A181187(n,4) - A181187(n,5). - Omar E. Pol, Oct 25 2012
From Peter Bala, Dec 26 2013: (Start)
a(n+4) - a(n) = A000041(n). a(n) + a(n+2) = A024786(n).
O.g.f.: x^4/(1 - x^4) * product {k >= 1} 1/(1 - x^k) = x^4 + x^5 + 2*x^6 + 3*x^7 + ....
Asymptotic result: log(a(n)) ~ 2*sqrt(Pi^2/6)*sqrt(n) as n -> inf. (End)
a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*Pi*sqrt(2*n)) * (1 - 49*Pi/(24*sqrt(6*n)) + (49/48 + 1633*Pi^2/6912)/n). - Vaclav Kotesovec, Nov 05 2016
G.f.: x^4/((1 - x)*(1 - x^2)*(1 - x^3)*(1 - x^4)) * Sum_{n >= 0} x^(4*n)/( Product_{k = 1..n} 1 - x^k ); that is, convolution of A026810 (partitions into 4 parts, or, modulo offset differences, partitions into parts <= 4) and A008484 (partitions into parts >= 4). - Peter Bala, Jan 17 2021

A024787 Number of 3's in all partitions of n.

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 6, 9, 15, 21, 31, 45, 63, 87, 122, 164, 222, 298, 395, 519, 683, 885, 1146, 1475, 1887, 2401, 3050, 3845, 4837, 6060, 7563, 9402, 11664, 14405, 17751, 21807, 26715, 32634, 39784, 48352, 58649, 70969, 85690, 103232, 124143, 148951, 178407, 213277, 254509
Offset: 1

Keywords

Comments

Starting with the first 1 = row sums of triangle A173239. - Gary W. Adamson, Feb 13 2010
The sums of three successive terms give A000070. - Omar E. Pol, Jul 12 2012
a(n) is also the difference between the sum of 3rd largest and the sum of 4th largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012

Examples

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

Programs

  • Maple
    b:= proc(n, i) option remember; local g;
          if n=0 or i=1 then [1, 0]
        else g:= `if`(i>n, [0$2], b(n-i, i));
             b(n, i-1) +g +[0, `if`(i=3, g[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 27 2012
  • Mathematica
    Table[ Count[ Flatten[ IntegerPartitions[n]], 3], {n, 1, 50} ]
    b[n_, i_] := b[n, i] = Module[{g}, If[n==0 || i==1, {1, 0}, g = If[i>n, {0, 0}, b[n-i, i]]; b[n, i-1] + g + {0, If[i==3, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)
    Join[{0, 0}, (1/((1 - x^3) QPochhammer[x]) + O[x]^50)[[3]]] (* Vladimir Reshetnikov, Nov 22 2016 *)

Formula

a(n) = A181187(n,3) - A181187(n,4). - Omar E. Pol, Oct 25 2012
a(n) = Sum_{k=1..floor(n/3)} A263232(n,k). - Alois P. Heinz, Nov 01 2015
a(n) ~ exp(Pi*sqrt(2*n/3)) / (6*Pi*sqrt(2*n)) * (1 - 37*Pi/(24*sqrt(6*n)) + (37/48 + 937*Pi^2/6912)/n). - Vaclav Kotesovec, Nov 05 2016
G.f.: x^3/((1 - x)*(1 - x^2)*(1 - x^3)) * Sum_{n >= 0} x^(3*n)/( Product_{k = 1..n} 1 - x^k ); that is, convolution of A069905 (partitions into 3 parts, or, modulo offset differences, partitions into parts <= 3) and A008483 (partitions into parts >= 3). - Peter Bala, Jan 17 2021

A024789 Number of 5's in all partitions of n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 3, 5, 8, 12, 17, 25, 35, 50, 68, 94, 126, 170, 226, 299, 391, 511, 660, 853, 1091, 1393, 1766, 2235, 2811, 3527, 4403, 5484, 6800, 8415, 10369, 12752, 15627, 19110, 23298, 28346, 34389, 41642, 50295, 60636, 72929, 87563, 104903, 125470
Offset: 1

Keywords

Comments

The sums of five successive terms give A000070. - Omar E. Pol, Jul 12 2012
a(n) is also the difference between the sum of 5th largest and the sum of 6th largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012

Examples

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

Programs

  • Maple
    b:= proc(n, i) option remember; local g;
          if n=0 or i=1 then [1, 0]
        else g:= `if`(i>n, [0$2], b(n-i, i));
             b(n, i-1) +g +[0, `if`(i=5, g[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 27 2012
  • Mathematica
    Table[ Count[ Flatten[ IntegerPartitions[n]], 5], {n, 1, 50} ]
    (* second program: *)
    b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 5, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)
  • PARI
    x='x+O('x^50); concat([0, 0, 0, 0], Vec(x^5/(1 - x^5) * prod(k=1, 50, 1/(1 - x^k)))) \\ Indranil Ghosh, Apr 06 2017

Formula

a(n) = A181187(n,5) - A181187(n,6). - Omar E. Pol, Oct 25 2012
a(n) ~ exp(Pi*sqrt(2*n/3)) / (10*Pi*sqrt(2*n)) * (1 - 61*Pi/(24*sqrt(6*n)) + (61/48 + 2521*Pi^2/6912)/n). - Vaclav Kotesovec, Nov 05 2016
G.f.: x^5/(1 - x^5) * Product_{k>=1} 1/(1 - x^k). - Ilya Gutkovskiy, Apr 06 2017
Showing 1-10 of 41 results. Next