A047993 Number of balanced partitions of n: the largest part equals the number of parts.
1, 0, 1, 1, 1, 1, 3, 2, 4, 4, 6, 7, 11, 11, 16, 19, 25, 29, 40, 45, 60, 70, 89, 105, 134, 156, 196, 232, 285, 336, 414, 485, 591, 696, 839, 987, 1187, 1389, 1661, 1946, 2311, 2702, 3201, 3731, 4400, 5126, 6018, 6997, 8195, 9502, 11093, 12849, 14949, 17281, 20062
Offset: 1
Examples
From _Joerg Arndt_, Oct 08 2012: (Start) a(12) = 7 because the partitions of 12 where the largest part equals the number of parts are 2 + 3 + 3 + 4, 2 + 2 + 4 + 4, 1 + 3 + 4 + 4, 1 + 2 + 2 + 2 + 5, 1 + 1 + 2 + 3 + 5, 1 + 1 + 1 + 4 + 5, and 1 + 1 + 1 + 1 + 2 + 6. (End) From _Gus Wiseman_, Mar 09 2019: (Start) The a(1) = 1 through a(13) = 11 integer partitions: 1 21 22 311 321 322 332 333 4222 4322 4332 4333 331 4211 4221 4321 4331 4422 4432 4111 4311 4411 4421 4431 4441 51111 52111 52211 52221 52222 53111 53211 53221 611111 54111 53311 621111 54211 55111 622111 631111 7111111 (End)
Links
- Vaclav Kotesovec, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe)
- Erich Friedman, Illustration of initial terms
Crossrefs
Programs
-
Haskell
a047993 = flip a063995 0 -- Reinhard Zumkeller, Jul 24 2013
-
Maple
A047993 := proc(n) a := 0 ; for p in combinat[partition](n) do r := max(op(p))-nops(p) ; if r = 0 then a := a+1 ; end if; end do: a ; end proc: seq(A047993(n),n=1..20) ; # Emeric Deutsch, Dec 11 2004
-
Mathematica
Table[ Count[Partitions[n], par_List/; First[par]===Length[par]], {n, 12}] or recur: Sum[T[n-(2m-1), m-1, m-1], {m, Ceiling[Sqrt[n]], Floor[(n+1)/2]}] with T[m_, a_, b_]/; b < a := T[m, b, a]; T[m_, a_, b_]/; m > a*b := 0; T[m_, a_, b_]/; (2m > a*b) := T[a*b-m, a, b]; T[m_, 1, b_] := If[b < m, 0, 1]; T[0, , ] := 1; T[m_, a_, b_] := T[m, a, b]=Sum[T[m-a*i, a-1, b-i], {i, 0, Floor[m/a]}]; Table[Sum[ -(-1)^k*(p[n-(3*k^2-k)/2] - p[n-(3*k^2+k)/2]), {k, 1, Floor[(1+Sqrt[1+24*n])/6]}] /. p -> PartitionsP, {n, 1, 64}] (* Wouter Meeussen *) (* also *) Table[Count[IntegerPartitions[n], q_ /; Max[q] == Length[q]], {n, 24}] (* Clark Kimberling, Feb 13 2014 *) nmax = 100; p = 1; s = 1; Do[p = Normal[Series[p*x^2*(1 - x^(2*k - 1))*(1 + x^k)/(1 - x^k), {x, 0, nmax}]]; s += p;, {k, 1, nmax + 1}]; Take[CoefficientList[s, x], nmax] (* Vaclav Kotesovec, Oct 16 2024 *)
-
PARI
N=66; q='q + O('q^N ); S=2+2*ceil(sqrt(N)); gf= sum(k=1, S, (-1)^k * ( q^((3*k^2+k)/2) - q^((3*k^2-k)/2) ) ) / prod(k=1,N, 1-q^k ); /* Joerg Arndt, Oct 08 2012 */
-
PARI
my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, x^(2*k-1)*prod(j=1, k-1, (1-x^(k+j-1))/(1-x^j)))) \\ Seiichi Manyama, Jan 24 2022
Formula
a(n) = p(n-1) - p(n-2) - p(n-5) + p(n-7) + ... + (-1)^k*(p(n-(3*k^2-k)/2) - p(n-(3*k^2+k)/2)) + ..., where p() is A000041(). E.g., a(20) = p(19) - p(18) - p(15) + p(13) + p(8) - p(5) = 490 - 385 - 176 + 101 + 22 - 7 = 45. - Vladeta Jovovic, Aug 04 2004
G.f.: ( Sum_{k>=1} (-1)^k * ( x^((3*k^2+k)/2) - x^((3*k^2-k)/2) ) ) / Product_{k>=1} (1-x^k). - Vladeta Jovovic, Aug 05 2004
a(n) ~ exp(Pi*sqrt(2*n/3))*Pi / (48*sqrt(2)*n^(3/2)) ~ p(n) * Pi / (4*sqrt(6*n)), where p(n) is the partition function A000041. - Vaclav Kotesovec, Oct 06 2016
G.f.: Sum_{n>=0} [2n,n]q q^(2*n), where [m,n]_q are the q-binomial coefficients. - _Mamuka Jibladze, Aug 12 2021
G.f.: Sum_{k>=1} x^(2*k-1) * Product_{j=1..k-1} (1-x^(k+j-1))/(1-x^j). - Seiichi Manyama, Jan 24 2022
Comments