-1

How can I find the set of prime numbers without using the direct trial and error?

  • 2
    Here is a list: https://en.wikipedia.org/wiki/Sexy_prime?wprov=sfla1 – Peter Foreman Feb 10 '19 at 18:48
  • 6
    "How can I find the set of prime numbers without using the direct trial and error?" You can't, really. It's a problem that has been worked on since the ancient Greeks, and we still don't know any significantly better ways of doing it (although I'm sure there are a bunch of clever ways to speed up your search). Heck, we don't even know whether there are infinitely many such pairs or not. – Arthur Feb 10 '19 at 18:54
  • 1
    Almost surely there is no (useful) formula for the primes. You can either sieve the positive integers or check every positive integer for primality. This concrete exercise could surely be done by hand, but today almost everyone would consider it as a waste of time :( – Peter Feb 10 '19 at 19:02
  • 1
    Your $p+6$ cannot be congruent to $+-1$ mod $6$ nor divisible by $3$ for any prime greater or equal to $5$. – LAAE Feb 10 '19 at 21:26

1 Answers1

2

As of now, we don't have any magical mathematical object which generates a kth prime or hands you a prime on demand provided the given condition(s).

What we do is that we try to establish if the given number is prime or not!

Establishing the fact that a given number is a prime number is an area of research with clever algorithms but most of them are computational in nature, that is, they are computation heavy and evaluated using the help of computers.

At the soul of such algorithm is their attempts to reduce the search space so as to reduce the computations.

The best you can do is to reduce your search space/computation time

Generate A List of All Odd Numbers having difference of 6.

Then:

  • Better approach: Find the prime numbers among them, by comparing it with ready-made list of prime numbers

  • More approaches can be added if OP specifies what kind of computational means are available to them.