Ask Your Question
1

Dedekind eta function in sage

asked 0 years ago

anonymous user

Anonymous

updated 0 years ago

dan_fulea gravatar image

I would like to use the dedekind eta function, q124n=1(1qn), in my code. However when I do

N = 20
R.<q> = 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).

Preview: (hide)

Comments

1

Not a SageMath way but you can try some Python libraries (and you can use them directly in SageMath): https://mpmath.org/doc/current/functions/qfunctions.html

tolga gravatar imagetolga ( 0 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 0 years ago

Max Alekseyev gravatar image

updated 0 years ago

It's a always a good idea using the existing functionality rather than reinventing the wheel. Without the factor q1/24 the expansion of eta function in Sage can be computed as follows:

from sage.modular.etaproducts import qexp_eta
N=20
qexp_eta(ZZ[['q']], N)
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 0 years ago

Seen: 445 times

Last updated: Aug 14 '24