login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A064403 Numbers k such that prime(k) + k and prime(k) - k are both primes. 10
4, 6, 18, 42, 66, 144, 282, 384, 408, 450, 522, 564, 618, 672, 720, 732, 744, 828, 858, 1122, 1308, 1374, 1560, 1644, 1698, 1776, 1848, 1920, 2022, 2304, 2412, 2616, 2766, 2778, 2874, 2958, 2970, 3036, 3042, 3240, 3258, 3354, 3360, 3432, 3540, 3594, 3732 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Starting with 6 all terms are == 0 (mod 6). - Zak Seidov, Jan 04 2013

LINKS

Harry J. Smith, Table of n, a(n) for n = 1..1000

EXAMPLE

4 is in the sequence because the fourth prime is 7 and both 7+4 and 7-4 are primes.

MATHEMATICA

Select[ Range[ 4000 ], PrimeQ[ Prime[ # ] + # ] && PrimeQ[ Prime[ # ] - # ] & ]; Join[{4}, Select[ Range[6, 4000, 6 ], PrimeQ[Prime[ # ] + # ] && PrimeQ[ Prime[ # ] - # ] & ]] (* Zak Seidov, Jan 04 2013 *)

Select[Range[4000], AllTrue[Prime[#]+{#, -#}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 25 2019 *)

PROG

(PARI) { n=0; default(primelimit, 1800000); for (m=1, 10^9, if (isprime(prime(m) + m) && isprime(prime(m) - m), write("b064403.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Sep 13 2009

CROSSREFS

Cf. A143794 (corresponding primes).

Sequence in context: A051253 A175955 A303526 * A235344 A060667 A218065

Adjacent sequences:  A064400 A064401 A064402 * A064404 A064405 A064406

KEYWORD

nonn

AUTHOR

Robert G. Wilson v, Sep 28 2001

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 29 14:50 EST 2021. Contains 349416 sequences. (Running on oeis4.)