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!)
A240110 Primes p such that p+2 and p^3+2 are also prime. 4
3, 5, 29, 71, 311, 419, 431, 1031, 1091, 1151, 1451, 1931, 2339, 3371, 3461, 4001, 4421, 4799, 5651, 6269, 6551, 6569, 6761, 6779, 6869, 7559, 7589, 8219, 9011, 9281, 10301, 11069, 11489, 11549, 12161, 12239, 12251, 12539, 14081, 15641, 17189, 18059, 18119, 18521 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

All the terms in the sequence, except a(1), are congruent to 2 mod 3.

LINKS

K. D. Bajpai, Table of n, a(n) for n = 1..3166

MAPLE

KD := proc() local a, b, d; a:=ithprime(n);  b:=a+2;  d:=a^3+2;  if isprime(b)and isprime(d) then RETURN (a);  fi;  end:  seq(KD(), n=1..10000);

MATHEMATICA

Select[Prime[Range[2200]], AllTrue[{#+2, #^3+2}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 14 2017 *)

PROG

(PARI) s=[]; forprime(p=2, 20000, if(isprime(p+2) && isprime(p^3+2), s=concat(s, p))); s \\ Colin Barker, Apr 01 2014

CROSSREFS

Cf. A000040, A048637, A140454, A175234, A236687, A236688.

Sequence in context: A048637 A128551 A154942 * A228502 A215663 A092330

Adjacent sequences:  A240107 A240108 A240109 * A240111 A240112 A240113

KEYWORD

nonn

AUTHOR

K. D. Bajpai, Apr 01 2014

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 September 28 11:24 EDT 2020. Contains 337393 sequences. (Running on oeis4.)