Euclid proof of the infinitude of primes can be extended into this.


Assuming there is a finite number of primes, $k$, sort them in increasing order and split the series after any prime at $t$. Create the difference between the products of each group.


$$ \left | \prod\_{t< m \leq k} p\_m - \prod\_{1 \leq n \leq t} p\_n \right | $$


The result cannot be divisible by any used prime, therefore it has to be $1$.


There are $k-1$ differences in the form:


$$ P\_k(t) = \prod\_{t< m \leq k} p\_m - \prod\_{1 \leq n \leq t} p\_n $$


and obviously:


$$ P\_{k}(1) > P\_{k}(2) > \cdots > P\_k(k-1) $$


However, in this strictly monotonic series, we can have only once $-1$ and $1$, which means that as long as there are at least four primes there cannot be a finite number of primes. And we know four initial primes.


The question which comes naturally is:


Can you write every prime as a difference between split products of the full set of first $k$ primes?


$$ p\_N = \left | \prod\_{n \in J} p\_n - \prod\_{m \notin J} p\_m \right |, J \subset \{1,2,...,k\}$$


It seems as we are adding more primes we have more combinations of the differences, closing to $2^m$ differences. However primorial function, the product of primes, grows as $m^m$ so it seems that it will quickly start skipping as we are going towards larger primes.


(I think there is only some hope if we loose the restriction and say that we are allowed to use two products of different set of primes, not necessarily the complete set, since then the number of combinations is somewhat larger, but it still does not look sufficient.)


Anyway, does the proof sound correct and what extension or restriction of this might still give us each prime?


(The proof here explicitly elaborates Euclid proof in the sense of what if we take that $p\_1 p\_2 \cdots p\_n + 1=1$ which is actually the only option, but without using $+1$, which is, albeit trivial actually, *constructed* for the purpose of the proof, and then it discusses the actual number of initial primes we need in order to claim that there is an infinite number of them.)


(Euclid's proof has a small gap that is rarely mentioned. Notice that when you create $p\_1p\_2p\_3...p\_n$ you implicitly assume that there is *at least* one prime number and that all primes are positive. $p\_1p\_2p\_3...p\_n+1=1$ is perfectly valid in case you have no prime numbers, and if primes can be negative everything falls apart. This is all elementary, but it is still a small gap.)



Extended Euclid proof and primes in form $|\prod\limits_{n \neq m} p_n -\prod\limits_{m \neq n} p_m|$
See Guy, Lacampagne, and Selfridge, [Primes at a Glance](https://www.ams.org/journals/mcom/1987-48-177/S0025-5718-1987-0866108-3/S0025-5718-1987-0866108-3.pdf), Mathematics of Computation, volume 48, number 177, January 1987, pages 183-202.


Abstract. Let $N = B - L$, $B \ge L$, $\gcd(B,L) = 1$, $p \mid BL$ for all primes $p\le\sqrt N$. Then $N$ is $0,1$ or a prime. Writing $N$ in this form suggests a primality and a squarefreeness test. If we also require that when the prime $q \mid BL$ and $p < q$ then $p \mid BL$, we say that $B - L$ is a *presentation* of $N$. We list all presentations found for any $N$. We believe our list is complete.


There is also Takashi Agoh, Paul Erdős and Andrew Granville, Primes at a (somewhat lengthy) glance, The American Mathematical Monthly Vol. 104, No. 10 (Dec., 1997), pp. 943-945.


