login
Number of partitions of n such that the least part occurs exactly twice.
42

%I #33 Oct 26 2018 18:32:25

%S 0,1,0,2,1,3,3,6,5,11,11,17,20,30,33,49,56,77,92,122,143,190,225,287,

%T 344,435,516,648,770,951,1134,1388,1646,2007,2376,2868,3395,4078,4807,

%U 5749,6764,8042,9449,11187,13101,15463,18070,21236,24772,29021,33764

%N Number of partitions of n such that the least part occurs exactly twice.

%C Also number of partitions of n such that the difference between the two largest distinct parts is 2 (it is assumed that 0 is a part in each partition). Example: a(6)=3 because we have [4,2], [3,1,1,1] and [2,2,2]. - _Emeric Deutsch_, Apr 08 2006

%C Number of partitions p of n+2 such that min(p) + (number of parts of p) is a part of p. - _Clark Kimberling_, Feb 27 2014

%C Number of partitions of n+1 such that the two smallest parts differ by one. - _Giovanni Resta_, Mar 07 2014

%C Also the number of integer partitions of n with an even number of parts that cannot be grouped into pairs of distinct parts. These are also integer partitions of n with an even number of parts whose greatest multiplicity is greater than half the number of parts. - _Gus Wiseman_, Oct 26 2018

%H Giovanni Resta, <a href="/A096373/b096373.txt">Table of n, a(n) for n = 1..1000</a>

%F G.f.: Sum_{m>0} (x^(2*m) / Product_{i>m} (1-x^i)}. More generally, g.f. for number of partitions of n such that the least part occurs exactly k times is Sum_{m>0} (x^(k*m)/Product_{i>m} (1-x^i)}.

%F G.f.: sum(x^(2k-2)*(1-x^(k-1))/product(1-x^j, j=1..k), k=1..infinity). - _Emeric Deutsch_, Apr 08 2006

%F a(n) = -p(n+3)+2*p(n+2)-p(n), p(n)=A000041(n). - _Mircea Merca_, Jul 10 2013

%F a(n) ~ exp(Pi*sqrt(2*n/3)) * Pi / (12*sqrt(2)*n^(3/2)). - _Vaclav Kotesovec_, Jun 02 2018

%e a(6)=3 because we have [4,1,1], [3,3] and [2,2,1,1].

%e G.f. = x^2 + 2*x^4 + x^5 + 3*x^6 + 3*x^7 + 6*x^8 + 5*x^9 + 11*x^10 + 11*x^11 + ...

%e From _Gus Wiseman_, Oct 26 2018: (Start)

%e The a(2) = 1 through a(10) = 11 partitions where the least part occurs exactly twice (zero terms not shown):

%e (11) (22) (311) (33) (322) (44) (522) (55)

%e (211) (411) (511) (422) (711) (433)

%e (2211) (3211) (611) (4311) (622)

%e (3311) (5211) (811)

%e (4211) (32211) (3322)

%e (22211) (4411)

%e (5311)

%e (6211)

%e (33211)

%e (42211)

%e (222211)

%e The a(2) = 1 through a(10) = 11 partitions that cannot be grouped into pairs of distinct parts (zero terms not shown):

%e (11) (22) (2111) (33) (2221) (44) (3222) (55)

%e (1111) (3111) (4111) (2222) (6111) (3331)

%e (111111) (211111) (5111) (321111) (4222)

%e (221111) (411111) (7111)

%e (311111) (21111111) (222211)

%e (11111111) (331111)

%e (421111)

%e (511111)

%e (22111111)

%e (31111111)

%e (1111111111)

%e (End)

%p g:=sum(x^(2*k)/product(1-x^j,j=k+1..80),k=1..70): gser:=series(g,x=0,55): seq(coeff(gser,x,n),n=1..51); # _Emeric Deutsch_, Apr 08 2006

%t (* do first *) Needs["DiscreteMath`Combinatorica`"] (* then *) f[n_] := Block[{p = Partitions[n], l = PartitionsP[n], c = 0, k = 1}, While[k < l + 1, q = PadLeft[ p[[k]], 3]; If[ q[[1]] != q[[3]] && q[[2]] == q[[3]], c++ ]; k++ ]; c]; Table[ f[n], {n, 51}] (* _Robert G. Wilson v_, Jul 23 2004 *)

%t Table[Count[IntegerPartitions[n+2], p_ /; MemberQ[p, Length[p] + Min[p]]], {n, 50}] (* _Clark Kimberling_, Feb 27 2014 *)

%t p[n_, m_] := If[m == n, 1, If[m > n, 0, p[n, m] = Sum[p[n-m, k], {k, m, n}]]];

%t a[n_] := Sum[p[n+1-k, k+1], {k, n/2}]; Array[a, 100] (* _Giovanni Resta_, Mar 07 2014 *)

%o (PARI) {q=sum(m=1,100,x^(2*m)/prod(i=m+1,100,1-x^i,1+O(x^60)),1+O(x^60));for(n=1,51,print1(polcoeff(q,n),","))} - _Klaus Brockhaus_, Jul 21 2004

%o (PARI) {a(n) = if( n<0, 0, polcoeff( ( 1 - (1 - x - x^2) / eta(x + x^4 * O(x^n)) ) * (1 - x) / x^3, n))} /* _Michael Somos_, Feb 28 2014 */

%Y Cf. A002865, A097091, A097092, A097093.

%Y Cf. A117989.

%Y Cf. A000070, A000569, A007717, A025065, A141268, A209816, A261049, A320328, A320891, A320921, A320922.

%K easy,nonn

%O 1,4

%A _Vladeta Jovovic_, Jul 19 2004

%E Edited and extended by _Robert G. Wilson v_ and _Klaus Brockhaus_, Jul 21 2004