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.

A284034 Primes p such that (p^2 - 3)/2 and (p^2 + 1)/2 are twin primes.

This page as a plain text file.
%I A284034 #36 Jan 29 2024 19:16:31
%S A284034 3,5,11,19,29,79,101,349,409,449,521,569,571,661,739,991,1091,1129,
%T A284034 1181,1459,1489,1531,1901,2269,2281,2341,2351,2389,2549,2659,2671,
%U A284034 2719,2729,2731,3109,4049,4349,5279,5431,5471,5531,5591,5669,6329,6359,6871,7559,7741
%N A284034 Primes p such that (p^2 - 3)/2 and (p^2 + 1)/2 are twin primes.
%C A284034 Primes which correspond to the short leg of an integral right triangle whose hypotenuse is part of a twin prime pair.
%C A284034 Each term p of the sequence must be part of a Pythagorean triple of the form {p, (p^2 - 1)/2, (p^2 + 1)/2} corresponding to {a(n), A284035(n) - 1, A284035(n)}.
%H A284034 Amiram Eldar, <a href="/A284034/b284034.txt">Table of n, a(n) for n = 1..10000</a>
%e A284034 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.
%t A284034 Select[Prime@ Range[10^3], Function[p, Times @@ Boole@ Map[PrimeQ[(p^2 + #)/2 ] &, {-3, 1}] == 1]] (* _Michael De Vlieger_, Mar 20 2017 *)
%t A284034 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 *)
%o A284034 (Sage) [p for p in prime_range(10000) if is_prime((p^2-3)//2) and is_prime((p^2+1)//2)]
%o A284034 (PARI) isok(p) = isprime(p) && isprime((p^2-3)/2) && isprime((p^2+1)/2); \\ _Michel Marcus_, Mar 31 2017
%Y A284034 Cf. A284035, A048161, A165635, A284036, A051642.
%K A284034 nonn
%O A284034 1,1
%A A284034 _Giuseppe Coppoletta_, Mar 19 2017