OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 13 is a term because 13 and 17 are consecutive primes with (13*17) mod (13+17) = 11 and floor(13*17/(13+17)) = 7 are prime.
MAPLE
P:= select(isprime, [2, seq(i, i=3..10^5, 2)]):
f:= proc(n) local s, t;
s:= P[n]+P[n+1];
t:= P[n]*P[n+1];
if isprime(t mod s) and isprime(floor(t/s)) then return P[n] fi
end proc:
map(f, [$1..nops(P)-1]);
MATHEMATICA
Select[Partition[Select[Range[6400], PrimeQ], 2, 1], PrimeQ[Mod[(p = First[#] * Last[#]), (s = First[#] + Last[#])]] && PrimeQ[Quotient[p, s]] &][[;; , 1]] (* Amiram Eldar, Jul 06 2021 *)
PROG
(PARI) list(lim)=my(v=List(), p=2, pq); forprime(q=3, nextprime(lim\1+1/2), pq=p*q; if(isprime(pq%(p+q)) && isprime(pq\(p+q)), listput(v, p)); p=q); Vec(v) \\ Charles R Greathouse IV, Jul 06 2021
(Python)
from sympy import nextprime, isprime
p, q, A346147_list = 2, 3, []
while len(A346147_list) < 1000:
if isprime(p*q % (p+q)) and isprime(p*q//(p+q)):
A346147_list.append(p)
p, q = q, nextprime(q) # Chai Wah Wu, Jul 06 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jul 06 2021
STATUS
approved