Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Summing primes, cannot convert to int

What can I do so that the following code works:

sage: var('k')
sage: sum(nth_prime(k),k,1,10)
ValueError: cannot convert k to int

Thanks in advance!