cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A284036 Positive integers n such that (n^2 - 3)/2 and (n^2 + 1)/2 are twin primes.

This page as a plain text file.
%I A284036 #26 Apr 09 2020 16:39:19
%S A284036 3,5,11,19,25,29,65,79,101,205,209,221,245,275,289,299,349,371,409,
%T A284036 415,449,521,535,569,571,575,595,649,661,695,739,781,791,935,949,991,
%U A284036 1081,1091,1099,1129,1181,1225,1241,1285,1345,1349,1459,1489,1531,1541,1615
%N A284036 Positive integers n such that (n^2 - 3)/2 and (n^2 + 1)/2 are twin primes.
%C A284036 All terms are obviously odd.
%H A284036 Robert Israel, <a href="/A284036/b284036.txt">Table of n, a(n) for n = 1..10000</a>
%e A284036 25 is a term because (25^2 - 3)/2 = 311 and (25^2 + 1)/2 = 313 are twin primes.
%p A284036 filter:= n -> isprime((n^2-3)/2) and isprime((n^2+1)/2):
%p A284036 select(filter, [seq(i,i=1..2000,2)]); # _Robert Israel_, Apr 24 2017
%t A284036 Select[Range[1, 1285, 2], Times @@ Boole@ Map[PrimeQ, (#^2 + {-3, 1})/2] == 1 &] (* _Michael De Vlieger_, Mar 28 2017 *)
%o A284036 (Sage) [n for n in range(3,1700,2) if is_prime((n^2 - 3)//2) and is_prime((n^2 + 1)//2)]
%o A284036 (PARI) isok(n) = isprime((n^2 - 3)/2) && isprime((n^2 + 1)/2); \\ _Michel Marcus_, Apr 04 2017
%o A284036 (Python)
%o A284036 from sympy import isprime
%o A284036 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
%Y A284036 Cf. A002731, A109358, A048161, A110589, A284034.
%K A284036 nonn
%O A284036 1,1
%A A284036 _Giuseppe Coppoletta_, Mar 27 2017