A246400 Smallest prime Q greater than prime(n+1) such that the sum prime(n)+prime(n+1)+Q is also prime, starting with n=2.
11, 11, 13, 17, 23, 23, 29, 31, 37, 41, 53, 47, 59, 67, 61, 71, 71, 73, 79, 89, 89, 97, 107, 109, 107, 127, 131, 127, 139, 139, 151, 157, 151, 157, 179, 167, 173, 181, 211, 197, 197, 223, 211, 211, 233, 227, 233, 263, 239, 271, 263, 269, 313, 277, 277, 281, 281
Offset: 2
Keywords
Examples
3+5+7=15 is composite and 3+5+11=19 is prime so a(2)=11. 5+7+11=23 is prime so a(3)=11.
Links
- Pierre CAMI, Table of n, a(n) for n = 2..10001
Crossrefs
Cf. A152470.
Programs
-
Mathematica
spq[n_]:=Module[{m=NextPrime[n],q},q=NextPrime[m];While[!PrimeQ[ m+n+q], q=NextPrime[q]];q]; Table[spq[n],{n,Prime[Range[2,60]]}] (* Harvey P. Dale, Apr 08 2018 *)
-
PARI
a(n) = t=prime(n)+prime(n+1); k=n+2; while(!isprime(t+q=prime(k)), k++); q \\ Colin Barker, Aug 25 2014
Comments