login
a(n) = 1 + coefficient of x^n in Product_{k>=1} (1-x^k) (essentially the expansion of the Dedekind function eta(x)).
(Formerly M0013)
4

%I M0013 #35 Aug 28 2016 18:23:35

%S 2,0,0,1,1,2,1,2,1,1,1,1,0,1,1,0,1,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,1,1,

%T 1,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,

%U 1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,1

%N a(n) = 1 + coefficient of x^n in Product_{k>=1} (1-x^k) (essentially the expansion of the Dedekind function eta(x)).

%D M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, Tenth Printing, 1972, p. 825.

%D B. Schoeneberg, Elliptic Modular Functions, Springer-Verlag, NY, 1974, p. 70.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H T. D. Noe, <a href="/A007706/b007706.txt">Table of n, a(n) for n = 0..1000</a>

%H M. Abramowitz and I. A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards Applied Math. Series 55, Tenth Printing, 1972, p. 825.

%F eta(z) = q^(1/24) Product_{m>=1} (1-q^m), q=exp(2 Pi i z).

%F G.f.: 1/(1-x) + Product_{k>0} (1-x^k). - _Michael Somos_, Jun 26 2004

%p eta := q^(1/24)*mul( (1-q^m), m=1..100);

%t p[n_] := p[n] = Expand[p[n-1]*(1-x^n)]; p[1] = 1-x; a[n_] := 1+Coefficient[p[n], x^n]; a[0] = 2; Table[a[n], {n, 0, 104}] (* _Jean-François Alcover_, Jan 06 2012 *)

%t 1 + CoefficientList[QPochhammer[q] + O[q]^120, q] (* _Jean-François Alcover_, Nov 24 2015 *)

%o (PARI) a(n)=if(n<0,0,1+polcoeff(eta(x+x*O(x^n)),n)) /* _Michael Somos_, Jun 26 2004 */

%Y Cf. A010815.

%K nonn,easy,nice

%O 0,1

%A _N. J. A. Sloane_, Sep 19 1994