Math fedi, help!
I'm looking for a function that calculates the next prime given a starting integer (not guaranteed prime) - i.e. what's the smallest prime larger than this number.
It looks like there are some functions for generating primes but nothing with a minimum and all the other articles are basically "loop and test each one" - maybe using a sieve function.
Does a nicer mathematic approach exist?
#Math #Mathematics #PrimeNumbers #Primes
About This Hashtag
#primenumbers
1 posts
Last used Jul 20
#primenumbers
1 posts· Last used Jul 20
You've seen all posts