Not a full proof, but one based on a conjecture by Farideh
Firoozbakht concerning prime gaps:
p[n+1]-p[n]< ln(p[n])^2-ln(p[n]) for all n>4 Wikipedia.
[With p[n] the níth prime].
r[i] = pq mod r[i-1], with r=p+q and q=q[k]=p^3-p-k.
Define the last residue r[n] as the first n for which r[n]<=1.
The question is whether the previous prime of q=p^3-p has r[n]=0
And I wish to show that if Farideh is right there is only one prime
p=5 such that r[n]=0.
Letís investigate when r[n]=0 and q[k] is prime:
Necessarily 0<=r[i]<r[i-1] (II)
p+q = p^3-k
r= (p(p+q)-p^2) mod (p+q) = -p^2 mod (p+q) = p^3-p^2-k
r= p(p^3-p-k) mod (p^3-p^2-k) = p (p^3-p^2-k+p^2-p) mod
(p^3-p^2-k) = p^3-p^2 mod (p^3-p^2-k) = k
It seems that the analysis breaks down here, so restart from the
r[n]=0=pq mod r[n-1]
Since p and q are relatively prime we must have r[n-1]|p or
r[n-1]|q. We also must have r[n-1]<>1, otherwise n is not defined
Therefore r[n-1]=p or r[n-1]=q. Since r[n-1]<r (II), the
last possibility q[k]=p^3-p-k<k gives the bound k> (p^3-p)/2. Since
there is always a prime
between q/2 and q, Bertrandís postulate, and we wish to find
the first prime q[k]<q, r[n-1]=q is not allowed.
So we must have r[n-1]=p<r=k and therefore k>p.
A small detail is that since p>1 we canít have r[n-1]=1, so n is
We arrive at:
r[n]=0 and q[k] prime implies k>p.
A consequence is that the primegap induced by k is at least
|q+1-q[k]|=k+1. Since q is not prime.
Now we apply the conjecture by Farideh:
This inequality gives 2<=p<=287. For 11<=p<=287 the condition of
Faridehís conjecture is satisfied.
[The inequality could be made slightly sharper for odd p]
Checking the p in the largest given interval gives the only
solution: p=5, k=7. (q.e.d.?)
Faridehís conjecture is very strong. If one replaces this conjecture
by Oppermanís conjecture: p[n+1]-p[n]<sqrt(p[n]) the given proof
If one solves r=p, n=4 , than one could find the condition
k|q, see below. One solution is p=5, k=7.
For n>=4 this method of backtracking becomes tricky because:
r[n-1]= p = pq mod r[n-2] gives: p(q-1) mod r[n-2]=0
gcd(r[n-2],p)=p: ( r[n-2]/p)|q-1 (r[n-2] is a multiple of p)
I see no direct way to estimate the size of the divisors of
q=q-1, preferably expressed in p, when solutions exist.
The second situation would give a sharper bound on k: k>ap with a>1.
But that bound is not large enough to apply a weaker conjecture. We
would need something like a>sqrt(p) to apply Oppermanís conjecture.