login
A346147
Primes p such that p*p' mod (p+p') and floor(p*p'/(p+p')) are prime, where p' is the next prime after p.
2
5, 11, 13, 113, 139, 157, 179, 193, 313, 359, 479, 509, 691, 773, 919, 953, 1019, 1039, 1093, 1453, 1571, 1873, 2297, 2341, 2357, 2459, 2633, 3089, 3229, 3253, 3571, 4021, 4219, 4483, 4523, 4663, 4889, 4933, 4943, 5113, 5153, 5179, 5233, 5261, 5323, 5449, 5591, 5639, 6037, 6073, 6079, 6337, 6373
OFFSET
1,1
COMMENTS
Primes prime(k) such that A212769(k) and A160830(k) are both prime.
LINKS
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
Sequence in context: A352534 A236411 A073615 * A275118 A275640 A275805
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jul 06 2021
STATUS
approved