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!)
A154321 Primes p such that p, p^2 + 2p - 4 and p^2 + 8p - 4 are prime. 3
3, 5, 7, 13, 23, 167, 233, 277, 283, 383, 547, 607, 727, 733, 823, 1087, 1427, 1597, 1823, 2297, 3253, 3313, 3533, 3593, 3863, 4027, 4133, 4363, 6257, 6737, 7477, 7577, 7907, 9043, 9227, 11317, 11497, 11833, 11867, 12373, 12503, 12637, 12743, 13367 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
For p = 3, p^2 + 2p - 4 = 11, p^2 + 8p - 4 = 29;
for p = 7, p^2 + 2p - 4 = 59, p^2 + 8p - 4 = 101;
for p = 607, p^2 + 2p - 4 = 369659, p^2 + 8p - 4 = 373301.
MAPLE
a:= proc(n) if isprime(n) and isprime(n^2+2*n-4) and isprime(n^2+8*n-4) then n end if end proc: seq(a(n), n = 2 .. 15000); # Emeric Deutsch, Jan 20 2009
MATHEMATICA
Select[Prime[Range[7000]], And@@PrimeQ/@{#^2 + 2 # - 4, #^2 + 8 # - 4}&] (* Vincenzo Librandi, Apr 18 2013 *)
Select[Prime[Range[2000]], AllTrue[#^2-4+{2#, 8#}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 29 2018 *)
PROG
(Magma) [p: p in PrimesUpTo(13500) | IsPrime(p^2+2*p-4) and IsPrime(p^2+8*p-4)]; // Vincenzo Librandi, Apr 18 2013
CROSSREFS
Sequence in context: A007658 A275175 A267549 * A024724 A024946 A257762
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jan 07 2009
EXTENSIONS
Corrected and extended by Emeric Deutsch, Jan 20 2009
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 14:54 EDT 2024. Contains 371960 sequences. (Running on oeis4.)