login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A304372
Primes p such that prime(p) + p + 1 and prime(p) - p - 1 are both prime.
1
5, 11, 23, 29, 149, 269, 293, 347, 617, 647, 683, 761, 809, 1259, 1553, 1619, 2003, 2063, 2081, 2129, 2297, 2309, 2381, 2579, 2693, 2897, 3023, 3557, 4241, 4721, 4799, 4817, 5519, 6197, 6719, 6833, 6959, 8237, 8537, 8597, 8783, 9029, 9461, 9677, 9929
OFFSET
1,1
COMMENTS
Subsequence of A317909 and consequently the resulting primes are a subsequence of A112885 (see A317909 for proof).
LINKS
EXAMPLE
p=5; prime(5) + 5 + 1 = 17 and prime(5) - 5 - 1 = 5, both prime so 5 is a member, and since the same does not hold for primes 2 and 3, a(1)=5.
MAPLE
N:=5000:
for X from 1 to N do
A:=ithprime(X);
P:=A+X+1;
Q:=A-X-1;
if isprime(X) and isprime(P) and isprime(Q) then print(X);
end if:
end do:
MATHEMATICA
Select[Prime[Range[2 10^3]], And@@PrimeQ[{Prime[#] + # + 1, Prime[#] - # - 1}] &] (* Vincenzo Librandi, Aug 18 2018 *)
PROG
(Magma) [n: n in [1..2*10^4] | IsPrime(n) and IsPrime (NthPrime(n)+n+1) and IsPrime (NthPrime(n)-n-1)]; // Vincenzo Librandi, Aug 18 2018
(PARI) isok(p) = isprime(p) && isprime(prime(p) + p + 1) && isprime(prime(p) - p - 1); \\ Michel Marcus, Aug 18 2018
CROSSREFS
Sequence in context: A228485 A161896 A317909 * A167610 A295149 A143127
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Vincenzo Librandi, Aug 18 2018
STATUS
approved