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.

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

A116645 Number of partitions of n having no doubletons. By a doubleton in a partition we mean an occurrence of a part exactly twice (the partition [4,(3,3),2,2,2,(1,1)] of 18 has two doubletons, shown between parentheses).

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 8, 10, 13, 20, 26, 33, 46, 58, 75, 101, 125, 157, 206, 253, 317, 403, 494, 608, 760, 926, 1131, 1393, 1685, 2038, 2487, 2985, 3585, 4331, 5168, 6172, 7392, 8771, 10410, 12382, 14622, 17258, 20400, 23975, 28159, 33115, 38739, 45298, 53000
Offset: 0

Views

Author

Emeric Deutsch and Vladeta Jovovic, Feb 20 2006

Keywords

Comments

Number of partitions of n having no part that appears exactly twice.
Infinite convolution product of [1,1,0,1,1,1,1,1,1,1] aerated n-1 times. I.e., [1,1,0,1,1,1,1,1,1,1] * [1,0,1,0,0,0,1,0,1,0] * [1,0,0,1,0,0,0,0,0,1] * ... - Mats Granvik, Gary W. Adamson, Aug 07 2009

Examples

			a(4) = 3 because we have [4],[3,1] and [1,1,1,1] (the partitions [2,2] and [2,1,1] do not qualify since each of them has a doubleton).
		

Crossrefs

Programs

  • Maple
    h:=product((1-x^(2*j)+x^(3*j))/(1-x^j),j=1..60): hser:=series(h,x=0,60): seq(coeff(hser,x,n),n=0..56);
  • Mathematica
    nn=48;CoefficientList[Series[Product[1/(1-x^i)-x^(2i),{i,1,nn}],{x,0,nn}],x] (* Geoffrey Critzer, Sep 30 2013 *)

Formula

G.f.: Product_{j>=1} (1-x^(2j)+x^(3j))/(1-x^j).
G.f. for the number of partitions of n having no part that appears exactly m times is Product_{k>0} (1/(1-x^k)-x^(m*k)).
a(n) = A000041(n) - A183559(n) = A183568(n,0) - A183568(n,2). - Alois P. Heinz, Oct 09 2011
a(n) ~ exp(sqrt((Pi^2/3 + 4*r)*n)) * sqrt(Pi^2/6 + 2*r) / (4*Pi*n), where r = Integral_{x=0..oo} log(1 + exp(-x) - exp(-2*x) + exp(-4*x)) dx = 0.64673501839556449802623523266221107725058748270577037891948... - Vaclav Kotesovec, Jun 12 2025

A118806 Triangle read by rows: T(n,k) is the number of partitions of n having k parts of multiplicity 3 (n,k>=0).

Original entry on oeis.org

1, 1, 2, 2, 1, 5, 6, 1, 9, 2, 12, 3, 19, 3, 24, 5, 1, 34, 8, 43, 13, 62, 13, 2, 77, 23, 1, 105, 28, 2, 132, 40, 4, 177, 49, 5, 220, 71, 6, 287, 89, 8, 1, 356, 123, 11, 462, 147, 18, 570, 198, 23, 1, 723, 249, 29, 1, 888, 329, 37, 1, 1121, 400, 50, 4, 1370, 518, 69, 1, 1705, 642, 85
Offset: 0

Views

Author

Emeric Deutsch, Apr 29 2006

Keywords

Comments

T(n,0)=A118807(n). T(n,1)=A118808(n). Row sums yield the partition numbers (A000041). Sum(k*T(n,k), k>=0)=A117524(n) (n>=1).

Examples

			T(12,2) = 2 because we have [3,3,3,1,1,1] and [3,2,2,2,1,1,1].
Triangle starts:
1;
1;
2;
2,  1;
5;
6,  1;
9,  2;
12, 3;
		

Crossrefs

Programs

  • Maple
    g:=product(1+x^j+x^(2*j)+t*x^(3*j)+x^(4*j)/(1-x^j),j=1..35): gser:=simplify(series(g,x=0,35)): P[0]:=1: for n from 1 to 30 do P[n]:=coeff(gser,x^n) od: for n from 0 to 30 do seq(coeff(P[n],t,j),j=0..degree(P[n])) od; # sequence given in triangular form

Formula

G.f.: product(1+x^j+x^(2j)+tx^(3j)+x^(4j)/(1-x^j), j=1..infinity).

A116596 Number of partitions of n having exactly 1 part that appears exactly once.

Original entry on oeis.org

1, 1, 1, 2, 4, 4, 8, 8, 12, 16, 23, 24, 40, 45, 59, 72, 99, 108, 153, 171, 224, 263, 341, 377, 504, 567, 711, 821, 1035, 1153, 1467, 1648, 2028, 2317, 2841, 3171, 3923, 4403, 5308, 6014, 7250, 8095, 9778, 10949, 13018, 14672, 17400, 19405, 23061, 25769, 30243
Offset: 1

Views

Author

Emeric Deutsch, Feb 18 2006

Keywords

Comments

Column 1 of A116595.

Examples

			a(5)=4 because we have [5],[3,1,1],[2,2,1] and [2,1,1,1] ([4,1],[3,2] and [1,1,1,1,1] do not qualify).
		

Crossrefs

Cf. A116595.

Programs

  • Maple
    f:=sum(x^j*(1-x^j)/(1-x^j+x^(2*j)),j=1..75)*product((1-x^j+x^(2*j))/(1-x^j),j=1..75): fser:=series(f,x=0,73): seq(coeff(fser,x^n),n=1..55);
  • Mathematica
    z = 30; u[p_] := Length[DeleteDuplicates[Select[p, Count[p, #] == 1 &]]]; m1[p_] := Min[Map[Length, Split[p]]]; Table[Count[IntegerPartitions[n], p_ /; u[p] == m1[p]], {n, 0, z}]  (* Clark Kimberling, Apr 23 2014 *)

Formula

G.f.=sum(x^j*(1-x^j)/(1-x^j+x^(2j)), j=1..infinity)product((1-x^j+x^(2j))/(1-x^j), j=1..infinity).
G.f. for number of partitions of n having exactly 1 part that appears exactly m times is sum(x^(m*j)*(1-x^j)/(1-x^(m*j)+x^((m+1)*j)), j=1..infinity)*product((1-x^(m*j)+x^((m+1)*j))/(1-x^j), j=1..infinity). - Vladeta Jovovic, May 01 2006
Showing 1-4 of 4 results.