Ask Your Question
0

Summing with Euler_phi Error

asked 2013-07-10 11:29:53 +0100

david8381 gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-07-10 11:39:36 +0100

vdelecroix gravatar image

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))
edit flag offensive delete link more

Comments

1
kcrisman gravatar imagekcrisman ( 2013-07-10 11:45:45 +0100 )edit

Your Answer

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

Add Answer

Question Tools

Stats

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

Seen: 290 times

Last updated: Jul 10 '13