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!)
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 (list; graph; refs; listen; history; text; internal format)
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

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 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)