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.

A002133 Number of partitions of n with exactly two part sizes.

This page as a plain text file.
%I A002133 M1324 N0507 #70 Aug 30 2025 09:48:36
%S A002133 0,0,1,2,5,6,11,13,17,22,27,29,37,44,44,55,59,68,71,81,82,102,97,112,
%T A002133 109,136,126,149,141,168,157,188,176,212,182,231,207,254,230,266,241,
%U A002133 300,259,319,283,344,295,373,311,386,352,417,353,452,368,460,418,492,413
%N A002133 Number of partitions of n with exactly two part sizes.
%C A002133 Also number of solutions to the Diophantine equation ab + bc + cd = n, with a,b,c >= 1. - _N. J. A. Sloane_, Jun 17 2011
%C A002133 A generalized sum of divisors function.
%D A002133 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A002133 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A002133 Alois P. Heinz, <a href="/A002133/b002133.txt">Table of n, a(n) for n = 1..10000</a>
%H A002133 George E. Andrews, <a href="http://dx.doi.org/10.1007/BF01608779">Stacked lattice boxes</a>, Ann. Comb. 3 (1999), 115-130. See L_3(n).
%H A002133 E. T. Bell, <a href="https://www.jstor.org/stable/2371037">The form wx+xy+yz+zu</a>, Bull. Amer. Math. Soc., 42 (1936), 377-380.
%H A002133 D. Christopher and T. Nadu, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Christopher/chris7.html">Partitions with Fixed Number of Sizes</a>, Journal of Integer Sequences, 15 (2015), #15.11.5.
%H A002133 W. J. Keith, <a href="https://doi.org/10.1142/S1793042117500130">Partitions into a small number of part sizes</a>, Int. Jour. of Num. Thy., Vol 13 no. 1, 229-241 (2017), doi:10.1142/S1793042117500130
%H A002133 P. A. MacMahon, <a href="http://dx.doi.org/10.1112/plms/s2-19.1.75">Divisors of numbers and their continuations in the theory of partitions</a>, Proc. London Math. Soc., 19 (1921), 75-113; Coll. Papers II, pp. 303-341.
%H A002133 N. Benyahia Tani, S. Bouroubi, and O. Kihel, <a href="https://liforce.usthb.dz/sites/default/files/2020-11/article3.pdf">An effective approach for integer partitions using exactly two distinct sizes of parts</a>, Bulletin du Laboratoire 03 (2015), 18-27.
%H A002133 N. B. Tani and S. Bouroubi, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Tani/tani7.html">Enumeration of the Partitions of an Integer into Parts of a Specified Number of Different Sizes and Especially Two Sizes</a>, J. Integer Seqs., Vol. 14 (2011), #11.3.6. (This sequence appears as the rightmost column of Table 1 on p. 10.)
%F A002133 G.f.: Sum_{i>=1} Sum_{j=1..i-1} x^(i+j)/((1-x^i)*(1-x^j)). - _Emeric Deutsch_, Mar 30 2006
%F A002133 Andrews gives a formula which is programmed up in the Maple code below. - _N. J. A. Sloane_, Jun 17 2011
%F A002133 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
%e A002133 a(8) = 13 because we have 71, 62, 611, 53, 5111, 422, 41111, 332, 3311, 311111, 22211, 221111, 2111111.
%p A002133 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
%p A002133 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
%p A002133 A002133 := proc(n)
%p A002133     A055507(n-1)+numtheory[tau](n)-numtheory[sigma](n) ;
%p A002133     %/2 ;
%p A002133 end proc: # _R. J. Mathar_, Jun 15 2022
%p A002133 # Using function P from A365676:
%p A002133 A002133 := n -> P(n, 2, n): seq(A002133(n), n = 1..59); # _Peter Luschny_, Sep 15 2023
%t A002133 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 *)
%t A002133 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 *)
%o A002133 (Python)
%o A002133 from sympy import divisor_count, divisor_sigma
%o A002133 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
%Y A002133 A diagonal of A060177.
%Y A002133 Cf. A002134.
%K A002133 nonn,look,easy,changed
%O A002133 1,4
%A A002133 _N. J. A. Sloane_