First time here? Check out the FAQ!
answered 2018-09-13 14:54:35 +0100
The problem is that range produces Python int, not Sage integers, hence the powermod method is not avaiable. Just replace range with srange and it shoud work !
range
int
powermod
srange