login
A002133
Number of partitions of n with exactly two part sizes.
(Formerly M1324 N0507)
34
0, 0, 1, 2, 5, 6, 11, 13, 17, 22, 27, 29, 37, 44, 44, 55, 59, 68, 71, 81, 82, 102, 97, 112, 109, 136, 126, 149, 141, 168, 157, 188, 176, 212, 182, 231, 207, 254, 230, 266, 241, 300, 259, 319, 283, 344, 295, 373, 311, 386, 352, 417, 353, 452, 368, 460, 418, 492, 413
OFFSET
1,4
COMMENTS
Also number of solutions to the Diophantine equation ab + bc + cd = n, with a,b,c >= 1. - N. J. A. Sloane, Jun 17 2011
A generalized sum of divisors function.
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).
LINKS
George E. Andrews, Stacked lattice boxes, Ann. Comb. 3 (1999), 115-130. See L_3(n).
E. T. Bell, The form wx+xy+yz+zu, Bull. Amer. Math. Soc., 42 (1936), 377-380.
Nesrine Benyahia-Tani and Sadek Bouroubi, Enumeration of the Partitions of an Integer into Parts of a Specified Number of Different Sizes and Especially Two Sizes, J. Int. Seq. 14 (2011), Art. 11.3.6. (This sequence appears as the rightmost column of Table 1 on p. 10.)
Nesrine Benyahia-Tani, Sadek Bouroubi, and Omar Kihel, An effective approach for integer partitions using exactly two distinct sizes of parts, Elem. Math. 72 (2017), 66-74.
Rong Chen and Tianjian Xu, Transformation Formulae and Applications for Double Lambert Series, arXiv:2605.28393 [math.NT], 2026. See p. 7.
David Christopher, Partitions with Fixed Number of Sizes, J. Int. Seq. 15 (2015), Art. 15.11.5.
William J. Keith, Partitions into a small number of part sizes, Int'l J. Num. Theory, 13(1) (2017), 229-241.
P. A. MacMahon, Divisors of numbers and their continuations in the theory of partitions, Proc. London Math. Soc., 19 (1921), 75-113; Coll. Papers II, pp. 303-341.
FORMULA
G.f.: Sum_{i>=1} Sum_{j=1..i-1} x^(i+j)/((1-x^i)*(1-x^j)). - Emeric Deutsch, Mar 30 2006
Andrews gives a formula which is programmed up in the Maple code below. - N. J. A. Sloane, Jun 17 2011
G.f.: (G(x)^2-H(x))/2 where G(x) = Sum_{k>0} x^k/(1-x^k) and H(x) = Sum_{k>0} x^(2*k)/(1-x^k)^2. More generally, we obtain g.f. for number of partitions of n with m types of parts if we substitute x(i) with -Sum_{k>0}(x^n/(x^n-1))^i in cycle index Z(S(m); x(1),x(2),...,x(m)) of symmetric group S(m) of degree m. - Vladeta Jovovic, Sep 18 2007
EXAMPLE
a(8) = 13 because we have 71, 62, 611, 53, 5111, 422, 41111, 332, 3311, 311111, 22211, 221111, 2111111.
MAPLE
g:=sum(sum(x^(i+j)/(1-x^i)/(1-x^j), j=1..i-1), i=1..80): gser:=series(g, x=0, 65): seq(coeff(gser, x^n), n=1..60); # Emeric Deutsch, Mar 30 2006
# Alternative:
with(numtheory); D00:=n->add(tau(j)*tau(n-j), j=1..n-1); L3:=n->(D00(n)+tau(n)-sigma(n))/2; [seq(L3(n), n=1..60)]; # N. J. A. Sloane, Jun 17 2011
# Alternative:
A002133 := proc(n)
A055507(n-1)+numtheory[tau](n)-numtheory[sigma](n) ;
%/2 ;
end proc: # R. J. Mathar, Jun 15 2022
# Alternative: using function P from A365676:
A002133 := n -> P(n, 2, n): seq(A002133(n), n = 1..59); # Peter Luschny, Sep 15 2023
MATHEMATICA
nn=50; ss=Sum[Sum[x^(i+j)/(1-x^i)/(1-x^j), {j, 1, i-1}], {i, 1, nn}]; Drop[CoefficientList[Series[ss, {x, 0, nn}], x], 1] (* Geoffrey Critzer, Sep 13 2012 *)
(* Alternative: *)
Table[DivisorSigma[0, n] - DivisorSigma[1, n] + Sum[DivisorSigma[0, k]*DivisorSigma[0, n - k], {k, 1, n - 1}], {n, 1, 100}]/2 (* Vaclav Kotesovec, Aug 30 2025 *)
PROG
(Python)
from sympy import divisor_count, divisor_sigma
def A002133(n): return sum(divisor_count(j)*divisor_count(n-j) for j in range(1, (n-1>>1)+1)) + ((divisor_count(n+1>>1)**2 if n-1&1 else 0)+divisor_count(n)-divisor_sigma(n)>>1) # Chai Wah Wu, Sep 15 2023
CROSSREFS
A diagonal of A060177.
Cf. A002134.
Sequence in context: A164874 A337498 A045845 * A092306 A349158 A383048
KEYWORD
nonn,look,easy
STATUS
approved