0
// x greater than 0. Calculate the // x value for the first case where the difference between the prime number and
the x + 1 prime number is greater than 300.
1 Answer
+ 1
I don't know c-sharp so even if you send a working example, I can't help. But the syntax is pretty easy. Generate the first n prime numbers. Maybe first 100,000. Then search each consecutive one for the difference. If it's not up to 300, then increase the number of primes.
Keep increasing the number of primes generated until you get the required difference. I've actually written a program kind of similar to this. But it was written in C.
https://code.sololearn.com/cugUOimL532n/?ref=app