A328022 Prime numbers p such that all 4 variables of the equation (p = i * q + r) are prime, with i being the index of p, q the quotient of p/i, and r the remainder of p/i.
17, 41, 367, 514275529
Offset: 1
Examples
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
Programs
-
Mathematica
Select[Prime@ Range[10^5], AllTrue[Join[{#1, #2}, QuotientRemainder[#1, #2]], PrimeQ] & @@ {#, PrimePi@ #} &] (* Michael De Vlieger, Oct 01 2019 *)
-
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
Extensions
a(4) from Andrew Howroyd, Oct 01 2019
Comments