Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Dedekind eta function in sage

I would like to use the dedekind eta function, $q^{\frac{1}{24}}\prod_{n=1}(1-q^n)$, in my code. However when I do

N=20 R. = PowerSeriesRing(QQ,default_prec=p*N+1)

eta = q^(1/24)*prod([(1-q^n) for n in range(1,N)]) eta =R(eta.truncate(N))

I get "ValueError: power series valuation is not a multiple of 24". I would like to know how I can implement the formula above or if there is some inbuilt eta function I can use somehow (I couldn't find anything in the documentation).

click to hide/show revision 2
None

Dedekind eta function in sage

I would like to use the dedekind eta function, $q^{\frac{1}{24}}\prod_{n=1}(1-q^n)$, in my code. However when I do

N = 20
R.<q> = PowerSeriesRing(QQ,default_prec=p*N+1)
  

N=20 R. = PowerSeriesRing(QQ,default_prec=p*N+1)

eta = q^(1/24)*prod([(1-q^n) q^(1/24) * prod([(1-q^n) for n in in range(1,N)]) eta =R(eta.truncate(N))

= R(eta.truncate(N))

I get "ValueError: power series valuation is not a multiple of 24". I would like to know how I can implement the formula above or if there is some inbuilt eta function I can use somehow (I couldn't find anything in the documentation).