OFFSET
1,1
COMMENTS
The other two variables in the equation result from the division of a prime p by its index i, giving quotient q and remainder r. All four of p, i, q, r are required to be prime.
For all remaining terms, q (which has become greater than 2) will be an odd prime, and q increases exponentially slowly. And when q is odd, exactly one of i and r will be odd. Consequently, a new term will only occur when r = 2 and both q and i are prime.
a(5) > 10^22, if it exists. - Giovanni Resta, Oct 02 2019
EXAMPLE
Known values:
n | a(n) = p = i * q + r
===+==============================
1 | 17 = 7 * 2 + 3
2 | 41 = 13 * 3 + 2
3 | 367 = 73 * 5 + 2
4 | 514275529 = 27067133 * 19 + 2
MATHEMATICA
Select[Prime@ Range[10^5], AllTrue[Join[{#1, #2}, QuotientRemainder[#1, #2]], PrimeQ] & @@ {#, PrimePi@ #} &] (* Michael De Vlieger, Oct 01 2019 *)
PROG
(PARI) lista(nn)={my(i=1); forprime(p=3, nn, i++; if(isprime(i), my(q=p\i); if(isprime(q)&&isprime(p-q*i), print1(p, ", ")) ))} \\ Andrew Howroyd, Oct 01 2019
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Eduardo P. Feitosa, Oct 01 2019
EXTENSIONS
a(4) from Andrew Howroyd, Oct 01 2019
STATUS
approved