\\% Multisection of Eta-product and Theta3 \\ Author: Joerg Arndt \\ License: GPL version 3 or later \\ online at http://www.jjj.de/pari/ \\ version: 2011-January-19 (12:51) \r eta.gpi \\ for chkN_() \\ Multisection of eta-product: \\ return series prod( n=1, \infty, 1-x^n ) \\ but only coefficients of x == s (mod m) Eta_msect(x,s,m,N=-1)= { local(et_, xx); chkN_(N); \\ eta(x) == 1 + sum(n=1,N,(-1)^n*x^(n*(3*n-1)/2)*(1+x^n)) et_ = if(s==0, 1, 0); for (n=1,N, xx = (n*(3*n-1)/2); if ( (xx%m)==s, et_ += (-1)^n*x^xx); xx = (n*(3*n+1)/2); if ( (xx%m)==s, et_ += (-1)^n*x^xx); ); return( et_ ); } /* ----- */ Theta3_msect(x,s,m,N=-1)= { local(th_, xx); chkN_(N); tt_ = if(s==0, 1, 0); for (n=-N,N, xx = n^2; if ( (xx%m)==s, th_ += x^xx); ); return( th_ ); } /* ----- */ \\ ==== end of file ====