First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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 !