OFFSET
1,1
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
The prime p = 79 is in the sequence because (p^2-3)/2 = 3119 and (p^2+1)/2 = 3121 are twin primes. Remark that {79, 3120, 3121} is a Pythagorean triple.
MATHEMATICA
Select[Prime@ Range[10^3], Function[p, Times @@ Boole@ Map[PrimeQ[(p^2 + #)/2 ] &, {-3, 1}] == 1]] (* Michael De Vlieger, Mar 20 2017 *)
Select[Prime[Range[1000]], AllTrue[{(#^2-3)/2, (#^2+1)/2}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 04 2017 *)
PROG
(Sage) [p for p in prime_range(10000) if is_prime((p^2-3)//2) and is_prime((p^2+1)//2)]
(PARI) isok(p) = isprime(p) && isprime((p^2-3)/2) && isprime((p^2+1)/2); \\ Michel Marcus, Mar 31 2017
KEYWORD
nonn
AUTHOR
Giuseppe Coppoletta, Mar 19 2017
STATUS
approved