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.

A347110 Primes p such that 2*p+1 and (2*p)^2+(2*p+1)^2 are also prime.

This page as a plain text file.
%I A347110 #18 Aug 20 2021 04:27:43
%S A347110 2,11,41,281,641,761,1451,1481,1811,2741,3821,4211,4481,5441,5501,
%T A347110 7121,7691,7901,8111,9791,10061,10331,11171,12011,13451,15401,16001,
%U A347110 16421,17351,17981,18041,27281,28961,30851,31151,32561,33941,35111,36191,43391,43691,43721,45131,45641,49331,49811,50411,50591
%N A347110 Primes p such that 2*p+1 and (2*p)^2+(2*p+1)^2 are also prime.
%C A347110 All terms except 2 end in 1.
%H A347110 Robert Israel, <a href="/A347110/b347110.txt">Table of n, a(n) for n = 1..10000</a>
%e A347110 a(3) = 41 is a term because 41, 2*41+1 = 83 and (2*41)^2+(2*41+1)^2 = 13613 are prime.
%p A347110 filter:= proc(p) isprime(p) and isprime(2*p+1) and isprime(8*p^2+4*p+1) end proc:
%p A347110 select(filter, [2,seq(i,i=3..100000,2)]);
%t A347110 Select[Prime@ Range[5190], AllTrue[{# + 1, #^2 + (# + 1)^2}, PrimeQ] &[2 #] &] (* _Michael De Vlieger_, Aug 18 2021 *)
%o A347110 (Python)
%o A347110 from sympy import isprime, primerange
%o A347110 def ok(p): return isprime(2*p+1) and isprime((2*p)**2 + (2*p+1)**2)
%o A347110 print(list(filter(ok, primerange(1, 50592)))) # _Michael S. Branicky_, Aug 18 2021
%o A347110 (PARI) isok(p) = isprime(p) && isprime(2*p+1) && isprime(8*p^2+4*p+1); \\ _Michel Marcus_, Aug 18 2021
%Y A347110 Intersection of A005384 and A103776.
%K A347110 nonn
%O A347110 1,1
%A A347110 _J. M. Bergot_ and _Robert Israel_, Aug 18 2021