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!)
A284036 Positive integers n such that (n^2 - 3)/2 and (n^2 + 1)/2 are twin primes. 2
3, 5, 11, 19, 25, 29, 65, 79, 101, 205, 209, 221, 245, 275, 289, 299, 349, 371, 409, 415, 449, 521, 535, 569, 571, 575, 595, 649, 661, 695, 739, 781, 791, 935, 949, 991, 1081, 1091, 1099, 1129, 1181, 1225, 1241, 1285, 1345, 1349, 1459, 1489, 1531, 1541, 1615 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
All terms are obviously odd.
LINKS
EXAMPLE
25 is a term because (25^2 - 3)/2 = 311 and (25^2 + 1)/2 = 313 are twin primes.
MAPLE
filter:= n -> isprime((n^2-3)/2) and isprime((n^2+1)/2):
select(filter, [seq(i, i=1..2000, 2)]); # Robert Israel, Apr 24 2017
MATHEMATICA
Select[Range[1, 1285, 2], Times @@ Boole@ Map[PrimeQ, (#^2 + {-3, 1})/2] == 1 &] (* Michael De Vlieger, Mar 28 2017 *)
PROG
(Sage) [n for n in range(3, 1700, 2) if is_prime((n^2 - 3)//2) and is_prime((n^2 + 1)//2)]
(PARI) isok(n) = isprime((n^2 - 3)/2) && isprime((n^2 + 1)/2); \\ Michel Marcus, Apr 04 2017
(Python)
from sympy import isprime
print([n for n in range(3, 1700, 2) if isprime((n**2 - 3)//2) and isprime((n**2 + 1)//2)]) # Indranil Ghosh, Apr 04 2017
CROSSREFS
Sequence in context: A243899 A168161 A217792 * A172438 A023233 A048161
KEYWORD
nonn
AUTHOR
Giuseppe Coppoletta, Mar 27 2017
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 March 28 10:55 EDT 2024. Contains 371241 sequences. (Running on oeis4.)