Generating prime $\ p_{n+1}\ $ (the complete version) Let $\ p_n\ $ be the consecutive primes starting with
$\ p_0:=2.\ $ Let $\ M(n)\ $ be the multiplicative monomial
generated by $\ \{p_k:\ k=0\ldots n\}\ $ (of course $\ 1\in M(n)$).
Could you prove or disprove:
$$ \forall_{n\in\mathbb Z_0}\, \exists_{K\ L\in M(n)}
\ \left( \prod_{k=0}^n p_k|K\cdot L\ \text{and}\ p_{n+1}=L-K\right).$$
 A: Assuming that the triple $(a,b,c)=(2,3^{10}\cdot 109,23^5)$ found by Eric Reyssat is the one with the highest quality $q=\log(c)/\log(\text{rad}(abc))=1.6299\ldots$ for the ABC conjecture, one quickly computes that there is indeed no solution for $p_{n+1}=31$. Setting $Q=\text{rad}(KLp_{n+1})=\prod_{k=0}^{n+1}p_k$, we get $\log(L)\le q\log(Q)$. Running through the possibilities for these $L$ with prime factors $\le29$, one checks that $K=L-p_{n+1}$ either has prime factors $\ge31$, or $\prod_{k=0}^{n}p_k$ does not divide $K\cdot L$.
The (naive) pure python code which runs about 20 seconds on my machine for $p_{n+1}=31$ (which is $q$ in the third line) is
from math import prod, floor, factorial

q = 31

a = [z for z in range(2, q) if factorial(z-1)%z == z-1] # primes < q
P = prod(a)
qual = 1.63 
c = floor((q*P)**qual) # upper bound for L

def La(K, a): # check if all prime divisors of K are in a
    for p in a:
        while K%p == 0:
            K //= p
    return K == 1

def indent(i): # Create iterator for candidates of L
    return ' '*(4*i)
s = 'def tmp():\n'
s += '    c0 = c\n'
s += '    x0 = 1\n'
for i in range(len(a)):
    s += indent(i+1) + f'b{i} = 1\n'
    s += indent(i+1) + f'while b{i} <= c{i}:\n'
    s += indent(i+2) + f'x{i+1} = x{i}*b{i}\n'
    s += indent(i+2) + f'c{i+1} = c{i}//b{i}\n'
    s += indent(i+2) + f'b{i} *= a[{i}]\n'
s += indent(len(a)+1) + f'yield x{len(a)}\n'
exec(s)
f = tmp()

for L in f:
    K = L-q
    if (K*L)%P == 0:
        if La(K, a):
            print(K, L)
            break
else:
    print('no solution')

