login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065117 Primes such that prime(p) +- pi(p) are simultaneously prime. 1
3, 113, 463, 593, 743, 1109, 2473, 4139, 4657, 4937, 5531, 5879, 6473, 6581, 6659, 6701, 7297, 7529, 8387, 8521, 8929, 9349, 10369, 10499, 12289, 12829, 13411, 13697, 14033, 14323, 15907, 18637, 19391, 19841, 21143, 21647, 23021, 27077 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Intersection of A065059 and A065060.
LINKS
EXAMPLE
113 is in the sequence because PrimePi(113) is 30, Prime(113) is 617, and both 587 and 647 are primes.
MATHEMATICA
Do[p0 = Prime[ Prime[n]]; p1 = PrimePi[ Prime[n]]; If[ PrimeQ[p0 + p1] && PrimeQ[p0 - p1], Print[ Prime[n]]], {n, 1, 5000} ]
spQ[n_]:=Module[{p=PrimePi[n]}, AllTrue[Prime[n]+{p, -p}, PrimeQ]]; Select[ Prime[ Range[10000]], spQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 03 2018 *)
PROG
(PARI) { n=0; default(primelimit, 4294965247); for (m=1, 10^9, p=prime(m); p0 = prime(p); p1 = primepi(p); if (isprime(p0 + p1) && isprime(p0 - p1), write("b065117.txt", n++, " ", p); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 10 2009
CROSSREFS
Sequence in context: A249164 A341047 A080174 * A227794 A225334 A240441
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Nov 12 2001
EXTENSIONS
Example corrected by Harvey P. Dale, Sep 03 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)