# Revision history [back]

### How to factorise a quantity obtained after summing?

list=[]

for n in range(2,20,2):
s = sum(1/k^n,k,1,oo)/(pi)^n
print(s)
list.append(s.factor())
print(list)


My code is given above I'm not able to use the .factor() function, I understand that this is due to the type of s in the above code which is sage.symbolic.expression.Expression . My question is how to convert it into 𝚜𝚊𝚐𝚎.𝚛𝚒𝚗𝚐𝚜.𝚛𝚊𝚝𝚒𝚘𝚗𝚊𝚕.𝚁𝚊𝚝𝚒𝚘𝚗𝚊𝚕 or something else so that I can factorise it. In the end I want to make a list of these numbers factorized.