Another challenging and interesting utilization of the nextprime would be to find prime gaps of some given minimum size, or their first occurrences.
You can also try asking them to find p such that
n! + p is prime for a given n. Leave it up to them to figure out they can start by nextprime(n+1) since anything between 1 and n would give a composite.
Last fiddled with by a1call on 20170420 at 15:51
