0

Is there really no way to generate infinitely many primes?

A previous answer for someone asking about the Infinite generation of primes, says:

There is no exact way to generate primes continuously.

But, there's formulae for:

  1. A275669 (Numbers k such that 3*k-1 is composite)
  2. A046954 (Numbers k such that 6*k + 1 is nonprime.), a.k.a non-primes of the form 3m + 1.

And using the complements of those, you get "Numbers k such that 3k+-1 is prime".

What primes aren't generated by that sequence? Beyond the trivials of 2 and 3?

Malady
  • 207
  • 4
    The sequences cited do not follow an explicit formula, as far as I can tell. Also, do they generate all composites? –  Jun 02 '22 at 13:52
  • @CarefreeXplorer - A275669: "Numbers n that can be expressed as 3xy+x-y for x>0, y>0." ...................... A046954: "These numbers (except 0) can be written as 6xy +-(x+y) for x > 0, y > 0." – Malady Jun 02 '22 at 13:56
  • 2
    It is easy to generate (some) composites, just take multiples of known primes. And of course there are ways to generate primes if you don't mind factoring huge numbers. Euclid's method works...multiply the primes you know and add $1$, then factor the result. Nobody knows a closed form way to generate primes, unfortunately. – lulu Jun 02 '22 at 13:58
  • 2
    The word "continuously" is misused here: In mathematics, continuity is a precise concept from analysts and topology, which is not applicable in the context of the question. As for various prime-generating functions, see here. Whether any of these satisfy your criteria, is up to you to decide. – Moishe Kohan Jun 02 '22 at 14:21

1 Answers1

1

If you don't mean every prime, there are many ways to keep generating primes.
A trivial example, until a counterexample is shown, is OEIS A135508.

That sequence is said to generate only 1's and primes.
But if one considers only prime terms that occur at n=p-1, only distinct, monotonic prime numbers are generated.
Alternately, A135506 generates all primes (except 3) in sequence if one considers only those terms>prior terms.

There are similar methods by Bouras. Of course, efficiency is an entire different matter.

Malady
  • 207