login
Number of ways to partition 2n+1 into distinct positive integers.
60

%I #37 May 25 2023 08:58:45

%S 1,2,3,5,8,12,18,27,38,54,76,104,142,192,256,340,448,585,760,982,1260,

%T 1610,2048,2590,3264,4097,5120,6378,7917,9792,12076,14848,18200,22250,

%U 27130,32992,40026,48446,58499,70488,84756,101698,121792,145578,173682

%N Number of ways to partition 2n+1 into distinct positive integers.

%C a(n) is also the number of partitions of 2n+1 in which all parts are odd, due to Euler's partition theorem. See A000009. - _Wolfdieter Lang_, Jul 08 2012

%D G. E. Andrews, The Theory of Partitions, Cambridge University Press, 1998, p. 19.

%H Alois P. Heinz, <a href="/A078408/b078408.txt">Table of n, a(n) for n = 0..10000</a> (first 1001 terms from Reinhard Zumkeller)

%H Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>

%F a(n) = t(2*n+1, 0), t as defined in A079211.

%F Euler transform of period 16 sequence [ 2, 0, 1, 1, 1, 1, 2, 0, 2, 1, 1, 1, 1, 0, 2, 0, ...]. - _Michael Somos_, Mar 04 2003

%F a(n)=A000009(2n+1). G.f.: 1/[(1-x)(1-x^3)(1-x^5)...] - _Jon Perry_, May 27 2004

%F Expansion of f(x, x^7) / f(-x, -x^2) where f(, ) is Ramanujan's general theta function. - _Michael Somos_, Oct 06 2015

%F From _Peter Bala_, Feb 04 2021: (Start)

%F G.f.: Sum_{n >= 0} x^n/Product_{k = 1..2*n+1} 1 - x^k. Replace q with q^2 and set t = q in Andrews, equation 2.2.5, p. 19, and then take the odd part of the series.

%F G.f.: 1/(1 - x)*Sum_{n>=0} x^floor(3*n/2)/Product_{k=1..n} (1 - x^k). (End)

%F a(n) = A282893(n+1) + A238478(n+1) = A035294(n+1) - A238479(n+1). - _Mathew Englander_, May 24 2023

%e a(3) = 5 because 7 = 1+6 = 2+5 = 3+4 = 1+2+4 (partitions into distinct parts) and 7 = 1+1+5 = 1+3+3 = 1+1+1+1+3 = 1+1+1+1+1+1+1 (partitions into odd parts). [_Wolfdieter Lang_, Jul 08 2012]

%e G.f. = 1 + 2*x + 3*x^2 + 5*x^3 + 8*x^4 + 12*x^5 + 18*x^6 + 27*x^7 + 38*x^8 + ...

%e G.f. = q^25 + 2*q^73 + 3*q^121 + 5*q^169 + 8*q^217 + 12*q^265 + 18*q^313 + ...

%p G := 1/(1 - x)*add(x^floor(3*n/2)/mul(1 - x^k, k = 1..n), n = 0..50):

%p S := series(G, x, 76):

%p seq(coeff(S, x, j), j = 0..75); # _Peter Bala_, Feb 04 2021

%t a[ n_] := SeriesCoefficient[ QPochhammer[ x^2] / QPochhammer[ x], {x, 0, 2 n + 1}]; (* _Michael Somos_, Oct 06 2015 *)

%o (PARI) {a(n) = my(A); if( n<0, 0, n = 2*n + 1; A = x * O(x^n); polcoeff( eta(x^2 + A) / eta(x + A), n))};

%o (Haskell)

%o import Data.MemoCombinators (memo2, integral)

%o a078408 n = a078408_list !! n

%o a078408_list = f 1 where

%o f x = (p' 1 x) : f (x + 2)

%o p' = memo2 integral integral p

%o p _ 0 = 1

%o p k m = if m < k then 0 else p' k (m - k) + p' (k + 2) m

%o -- _Reinhard Zumkeller_, Nov 27 2015

%Y Cf. A035294, A078409, A078410.

%Y Cf. A005408, A000009.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, Dec 27 2002

%E More terms from _Reinhard Zumkeller_, Dec 28 2002