%I #59 Feb 05 2021 10:08:07
%S 1,1,2,4,6,10,15,22,32,46,64,89,122,165,222,296,390,512,668,864,1113,
%T 1426,1816,2304,2910,3658,4582,5718,7108,8808,10880,13394,16444,20132,
%U 24576,29927,36352,44046,53250,64234,77312,92864,111322,133184,159046
%N Number of ways to partition 2n into distinct positive integers.
%C Also, number of partitions of 2n into odd numbers. - _Vladeta Jovovic_, Aug 17 2004
%C This sequence was originally defined as the expansion of sum ( q^n / product( 1-q^k, k=1..2*n), n=0..inf ). The present definition is due to _Reinhard Zumkeller_. Michael Somos points out that the equivalence of the two definitions follows from Andrews, page 19.
%C Also, number of partitions of 2n with max descent 1 and last part 1. - _Wouter Meeussen_, Mar 31 2013
%D G. E. Andrews, The Theory of Partitions, Cambridge University Press, 1998, p. 19.
%H Alois P. Heinz, <a href="/A035294/b035294.txt">Table of n, a(n) for n = 0..10000</a>
%H N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>
%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) = A000009(2*n). - _Michael Somos_, Mar 03 2003
%F Expansion of sum ( q^n / product( 1-q^k, k=1..2*n), n=0..inf ).
%F a(n) = T(2*n, 0), T as defined in A026835.
%F G.f.: Product((1 + x^(8 * i + 1)) * (1 + x^(8 * i + 2))^2 * (1 + x^(8 * i + 3))^2 * (1 + x^(8 * i + 4))^3 * (1 + x^(8 * i + 5))^2 * (1 + x^(8 * i + 6))^2 * (1 + x^(8 * i + 7)) * (1 + x^(8 * i + 8))^3, i=0..infinity). - _Vladeta Jovovic_, Oct 10 2004
%F G.f.: (Sum_{k>=0} x^A074378(k)) / (Product_{k>0} (1 - x^k)) = f( x^3, x^5) / f(-x, -x^2) where f(, ) is Ramanujan's general theta function. - _Michael Somos_, Nov 01 2005
%F Euler transform of period 16 sequence [1, 1, 2, 1, 2, 0, 1, 0, 1, 0, 2, 1, 2, 1, 1, 0, ...]. - _Michael Somos_, Dec 17 2002
%F a(n) ~ exp(sqrt(2*n/3)*Pi) / (2^(11/4) * 3^(1/4) * n^(3/4)). - _Vaclav Kotesovec_, Oct 06 2015
%F a(n) = A000041(n) + A282893(n). - _Michael Somos_, Feb 24 2017
%F Convolution with A000041 is A058696. - _Michael Somos_, Feb 24 2017
%F Convolution with A097451 is A262987. - _Michael Somos_, Feb 24 2017
%F G.f.: 1/(1 - x)*Sum_{n>=0} x^floor((3*n+1)/2)/Product_{k=1..n} (1 - x^k). - _Peter Bala_, Feb 04 2021
%e a(4)=6 [8=7+1=6+2=5+3=5+2+1=4+3+1=2*4].
%e G.f. = 1 + x + 2*x^2 + 4*x^3 + 6*x^4 + 10*x^5 + 15*x^6 + 22*x^7 + 46*x^9 + ...
%e G.f. = q + q^49 + 2*q^97 + 4*q^145 + 6*q^193 + 10*q^241 + 15*q^289 + ...
%p b:= proc(n, i) option remember; `if`(n=0, 1,
%p `if`(i<1, 0, b(n, i-2)+`if`(i>n, 0, b(n-i, i))))
%p end:
%p a:= n-> b(2*n, 2*n-1):
%p seq(a(n), n=0..50); # _Alois P. Heinz_, Feb 11 2015
%t Table[Count[IntegerPartitions[2 n], q_ /; Union[q] == Sort[q]], {n, 16}];
%t Table[Count[IntegerPartitions[2 n], q_ /; Count[q, _?EvenQ] == 0], {n, 16}];
%t Table[Count[IntegerPartitions[2 n], q_ /; Last[q] == 1 && Max[q - PadRight[Rest[q], Length[q]]] <= 1 ], {n, 16}];
%t (* _Wouter Meeussen_, Mar 31 2013 *)
%t a[ n_] := SeriesCoefficient[ QPochhammer[ x^2] /QPochhammer[ x], {x, 0, 2 n}]; (* _Michael Somos_, May 06 2015 *)
%t a[ n_] := SeriesCoefficient[ QPochhammer[ -x^3, x^8] QPochhammer[ -x^5, x^8] QPochhammer[ x^8] / QPochhammer[ x], {x, 0, n}]; (* _Michael Somos_, May 06 2015 *)
%t nmax=60; CoefficientList[Series[Product[(1+x^(8*k+1)) * (1+x^(8*k+2))^2 * (1+x^(8*k+3))^2 * (1+x^(8*k+4))^3 * (1+x^(8*k+5))^2 * (1+x^(8*k+6))^2 * (1+x^(8*k+7)) * (1+x^(8*k+8))^3, {k,0,nmax}],{x,0,nmax}],x] (* _Vaclav Kotesovec_, Oct 06 2015 *)
%t b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-2] + If[i>n, 0, b[n-i, i]]]]; a[n_] := b[2n, 2n-1]; Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Aug 30 2016, after _Alois P. Heinz_ *)
%o (PARI) {a(n) = my(A); if( n<0, 0, n*=2; A = x * O(x^n); polcoeff( eta(x^2 + A) / eta(x + A), n))};/* _Michael Somos_, Nov 01 2005 */
%o (Haskell)
%o import Data.MemoCombinators (memo2, integral)
%o a035294 n = a035294_list !! n
%o a035294_list = f 1 where
%o f x = (p' 1 (x - 1)) : 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. A000009, A000041, A058686, A262987, A282893.
%Y Cf. A078408, A078406, A078407.
%Y Cf. A079122, A079126, A079124, A079125, A067953.
%Y Cf. A005408.
%K nonn,easy
%O 0,3
%A _N. J. A. Sloane_, _Bill Gosper_