Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 7 years ago

dan_fulea gravatar image

This is a solution that puts first all "possibly relevant small primes" for the task in a list, than asks for the index of a prime in the list, in a dialog with the sage interpreter:

sage: pList = prime_range(10**6)
sage: pList.index(541)
99

(So it is the pythonically 99.th place.)