Ask Your Question

jds9973's profile - activity

2018-09-13 14:54:40 +0100 received badge  Student (source)
2018-09-13 14:48:30 +0100 asked a question Using powermod in a loop

Sorry if this question is naive, I have just started using Sage. I was playing around with Carmichael numbers and wanted to produce a list of a^n mod n for various values of a.

I thought the code for k in range(2,5): j = k.powermod(n,n)

would do what I wanted. But I get the error message 'int' object has no attribute 'powermod'

Any suggestions?