cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A346147 #15 Jul 06 2021 20:19:12
%S A346147 5,11,13,113,139,157,179,193,313,359,479,509,691,773,919,953,1019,
%T A346147 1039,1093,1453,1571,1873,2297,2341,2357,2459,2633,3089,3229,3253,
%U A346147 3571,4021,4219,4483,4523,4663,4889,4933,4943,5113,5153,5179,5233,5261,5323,5449,5591,5639,6037,6073,6079,6337,6373
%N 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.
%C A346147 Primes prime(k) such that A212769(k) and A160830(k) are both prime.
%H A346147 Robert Israel, <a href="/A346147/b346147.txt">Table of n, a(n) for n = 1..10000</a>
%e A346147 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.
%p A346147 P:= select(isprime, [2,seq(i,i=3..10^5,2)]):
%p A346147 f:= proc(n) local s,t;
%p A346147    s:= P[n]+P[n+1];
%p A346147    t:= P[n]*P[n+1];
%p A346147    if isprime(t mod s) and isprime(floor(t/s)) then return P[n] fi
%p A346147 end proc:
%p A346147 map(f, [$1..nops(P)-1]);
%t A346147 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 *)
%o A346147 (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
%o A346147 (Python)
%o A346147 from sympy import nextprime, isprime
%o A346147 p, q, A346147_list = 2,3,[]
%o A346147 while len(A346147_list) < 1000:
%o A346147     if isprime(p*q % (p+q)) and isprime(p*q//(p+q)):
%o A346147         A346147_list.append(p)
%o A346147     p, q = q,nextprime(q) # _Chai Wah Wu_, Jul 06 2021
%Y A346147 Cf. A160830, A212769.
%K A346147 nonn
%O A346147 1,1
%A A346147 _J. M. Bergot_ and _Robert Israel_, Jul 06 2021