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!)
A352604 Primes p such that p^2+3*p+1 and p^2+p-1 are also prime. 1
2, 3, 5, 19, 53, 59, 163, 263, 349, 373, 419, 449, 499, 1013, 1093, 1259, 1303, 1423, 1489, 1493, 1669, 1759, 2069, 2729, 2879, 3463, 3943, 4159, 4243, 4283, 4493, 4603, 4793, 4969, 5113, 5303, 5563, 6323, 6599, 6803, 6829, 6883, 7369, 7523, 7529, 7963, 8039, 8713, 8969, 9043, 9173, 9293, 9623 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Primes p such that (p-1)*p+(p-1)+p and p*(p+1)+p+(p+1) are also prime.

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

a(3) = 5 is a term because 5, 5^2+3*5+1 = 41 and 5^2+5-1 = 29 are all prime.

MAPLE

select(t -> isprime(t^2+3*t+1) and isprime(t^2+t-1), [seq(ithprime(i), i=1..10000)]);

PROG

(Python)

from itertools import islice

from sympy import isprime, nextprime

def agen():

    p = 2

    while True:

        if isprime(p**2 + 3*p + 1) and isprime(p**2 + p - 1):

            yield p

        p = nextprime(p)

print(list(islice(agen(), 53))) # Michael S. Branicky, Mar 22 2022

CROSSREFS

Intersection of A053184 and A153590.

Sequence in context: A140560 A118625 A031133 * A235622 A235637 A028490

Adjacent sequences:  A352601 A352602 A352603 * A352605 A352606 A352607

KEYWORD

nonn

AUTHOR

J. M. Bergot and Robert Israel, Mar 22 2022

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 August 7 23:50 EDT 2022. Contains 355995 sequences. (Running on oeis4.)