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.

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

This page as a plain text file.
%I A347165 #12 Aug 22 2021 12:42:25
%S A347165 3,79,379,829,1279,2029,3019,3109,3529,3709,5479,5749,6379,6709,7219,
%T A347165 7369,8689,11839,12049,13219,13729,14029,14419,15319,15349,16189,
%U A347165 17659,18229,18439,20809,24979,25819,26539,28549,30859,32119,32359,32779,33739,34729,37039,38569,39079,39679,44119,44449
%N A347165 Primes p such that 2*p-1 and (2*p-1)^2+(2*p)^2 are also prime.
%C A347165 Except for 3, all terms end in 9.
%H A347165 Robert Israel, <a href="/A347165/b347165.txt">Table of n, a(n) for n = 1..10000</a>
%e A347165 a(3) = 379 is a term because 379, 2*379-1 = 757 and (2*379-1)^2+(2*379)^2 = 1147613 are prime.
%p A347165 filter:= proc(p) isprime(p) and isprime(2*p-1) and isprime(8*p^2-4*p+1) end proc:
%p A347165 select(filter, [3, seq(i,i=9..50000,10)]);
%o A347165 (Python)
%o A347165 from sympy import isprime, primerange
%o A347165 def ok(p): return isprime(2*p-1) and isprime((2*p-1)**2 + (2*p)**2)
%o A347165 def aupto(limit): return list(filter(ok, primerange(2, limit+1)))
%o A347165 print(aupto(44450)) # _Michael S. Branicky_, Aug 20 2021
%Y A347165 Cf. A347110.
%K A347165 nonn
%O A347165 1,1
%A A347165 _J. M. Bergot_ and _Robert Israel_, Aug 20 2021