|
|
A073681
|
|
Smallest of three consecutive primes whose sum is a prime.
|
|
18
|
|
|
5, 7, 11, 17, 19, 23, 29, 31, 41, 53, 61, 67, 71, 79, 83, 101, 109, 139, 149, 157, 163, 197, 211, 229, 271, 281, 283, 293, 311, 337, 347, 349, 379, 389, 401, 409, 431, 449, 457, 463, 467, 491, 499, 509, 547, 617, 641, 653, 659, 661, 701, 719, 743, 751, 757
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
Harry J. Smith, Table of n, a(n) for n = 1..2000
|
|
MAPLE
|
t0:=[];
t1:=[];
t2:=[];
for i from 1 to 1000 do
t3:=ithprime(i)+ithprime(i+1)+ithprime(i+2);
if isprime(t3) then
t0:=[op(t0), i];
t1:=[op(t1), ithprime(i)];
t2:=[op(t2), ithprime(i+2)];
fi;
od:
t1;
|
|
MATHEMATICA
|
lst={}; Do[p0=Prime[n+0]; p1=Prime[n+1]; p2=Prime[n+2]; d1=p1-p0; d2=p2-p1; If[PrimeQ[p0+p1+p2], AppendTo[lst, p0]], {n, 10^3}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 08 2008 *)
Transpose[Select[Partition[Prime[Range[200]], 3, 1], PrimeQ[Total[#]]&]] [[1]] (* Harvey P. Dale, Jan 25 2012 *)
|
|
PROG
|
(PARI) forprime(p=1, 1000, pp=nextprime(p+1); if(isprime(p+pp+nextprime(pp+1)), print1(p", ")))
(PARI) A073681(n, print_all=0, start=3)={my(r, q=1); forprime(p=start, , isprime(r+(r=q)+(q=p)) & (n-- ||return(precprime(r-1))) & print_all & print1(precprime(r-1)", "))} \\ M. F. Hasler, Dec 18 2012
(Magma) [NthPrime(n): n in [0..200] | IsPrime(NthPrime(n)+NthPrime(n+1)+ NthPrime(n+2))]; // Vincenzo Librandi, May 06 2015
|
|
CROSSREFS
|
Cf. A152469, A152470, A174742, A034962, A152468, A180948, A189571, A180950, A226380.
Sequence in context: A168224 A084197 A180952 * A155772 A258992 A020582
Adjacent sequences: A073678 A073679 A073680 * A073682 A073683 A073684
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Amarnath Murthy, Aug 11 2002
|
|
EXTENSIONS
|
More terms from Ralf Stephan, Mar 20 2003
More cross-references from Harvey P. Dale, Jun 05 2013
|
|
STATUS
|
approved
|
|
|
|