Some ways to get a set of primes
What would be some easy way to get a set of primes?
I do not want a way to get a complete set of primes; rather, I just want to see a way of getting some subset of primes - which cardinality would still be infinite.
Consider the sequence $$a_n=a_{n-1}+\gcd(n,a_{n-1}),\ \ a_1=7$$ Then $a_n-a_{n-1}$ is always either a prime or 1.
The introduction of Eric Rowland's paper on this sequence discusses several other prime generating functions which might be worth looking at.
There is no known formula which
produces infinitely many primes, and
produces only primes, and
is practical.
How about using Mills' constant?
$\lfloor A^{3^n}\rfloor$ is prime for all positive integers $n$.
While "easy", it does not translate into any practical method.
There was an (I think) interesting article in AMM a while back which noted that if you take a product of consecutive primes $\pi_{n=1}^k p_n$ and divide it into two smaller products $\pi_1=\pi_{n=1}^m p_n$ and $\pi_2 = \pi_{n=m+1}^k p_n,$ if you subtract the two products the difference $d = |\pi_2 - \pi_1|$ will be prime if the difference is small enough (and maybe there were some other requirements).
Ah. The article is by Thompson, American Mathematical Monthly, vol. 60 no. 3 (1953), A Method for Finding Primes. I don't have access to it.
For example (only), $11\cdot7 - 2\cdot3\cdot5 = 47, $ which is evidently prime because it is not a product of any primes less than $11$, and $11\cdot13$ is already too big. This is the general idea.
It too is impractical.