# Revision history [back]

### How to do arithmetic with a basis element from modular forms space

Hi, I'm new to Sage and coding in general. I want to look at the 1-dim'l space CuspForms(Gamma0(23), 3) but with character. Here's my code for that

S = G = DirichletGroup(7, QQ)
list(G)
G.gens()
e = G.0
S = CuspForms(e, 3, prec=20)
print(S)
print(Gamma0(7).cusps())
print(S.basis())
g = S.0


Here, g is the only basis element for S. I want to do F = g*(L+4) where L is some eta-quotient of level 7. However, I get a long error with 'NoneType' object is not iterable at the end. So I'm thinking I need to define g in a different way, since it seems to be that g is not a q-series type object the way I've defined it?

### How to do arithmetic with a basis element from modular forms space

Hi, I'm new to Sage and coding in general. I want to look at the 1-dim'l space CuspForms(Gamma0(23), 3) but with character. Here's my code for that

S = G = DirichletGroup(7, DirichletGroup(23, QQ)
list(G)
G.gens()
e = G.0
S = CuspForms(e, 3, prec=20)
print(S)
print(Gamma0(7).cusps())
print(Gamma0(23).cusps())
print(S.basis())
g = S.0


Here, g is the only basis element for S. I want to do F = g*(L+4) where L is some eta-quotient of level 7. However, I get a long error with 'NoneType' object is not iterable at the end. So I'm thinking I need to define g in a different way, since it seems to be that g is not a q-series type object the way I've defined it? it?

### How to do arithmetic with a basis element from modular forms space

Hi, I'm new to Sage and coding in general. I want to look at the 1-dim'l space CuspForms(Gamma0(23), CuspForms(Gamma0(7), 3) but with character. Here's my code for that

S = G = DirichletGroup(23, DirichletGroup(7, QQ)
list(G)
G.gens()
e = G.0
S = CuspForms(e, 3, prec=20)
print(S)
print(Gamma0(23).cusps())
print(Gamma0(7).cusps())
print(S.basis())
g = S.0


Here, g is the only basis element for S. I want to do F = g*(L+4) where L is some eta-quotient of level 7. However, I get a long error with 'NoneType' object is not iterable at the end. So I'm thinking I need to define g in a different way, since it seems to be that g is not a q-series type object the way I've defined it?