Ask Your Question

# Summing with Euler_phi Error

New to sage, having some trouble with summation.

z, k both declared as variables.

sum((euler_phi(k)/k)log(1/(1-2z^k)),k,2,5)

Error: not an integer argument in an arithmetic function (18) If I change it to euler_phi(5)/5 it's fine.

edit retag close merge delete

## 1 Answer

Sort by ยป oldest newest most voted

I guess this is because euler_phi does not accept symbolic argument

sage: var('z')
sage: euler_phi(z)
Traceback (most recent call last):
...
PariError: not an integer argument in an arithmetic function (18)


Nevertheless, you can do

sage: sum((euler_phi(k)/k)*log(1/(1-2*z^k)) for k in xrange(2,5))
1/2*log(-1/(2*z^4 - 1)) + 2/3*log(-1/(2*z^3 - 1)) + 1/2*log(-1/(2*z^2 - 1))

more

## Comments

1
( 2013-07-10 11:45:45 +0200 )edit

## Your Answer

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

Add Answer

## Stats

Asked: 2013-07-10 11:29:53 +0200

Seen: 277 times

Last updated: Jul 10 '13