I would like to use sage to compute the following sum:
sum of the divisors of (D-b^2)/4 where b is an integer satisfying; absolute value of b is less than D and b is equivalent to D modulo 2.
This is what I tried:
def bqfs(d):
answer=[]
for b in range (sqrt(d)):
c=(d-b^2)/4
if c.is_integral():
answer.extend(sum(sigma(c))
return answer
I get invalid syntax error message.