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.

A270249 Greater of a pair of twin primes (r,s=r+2) where s is of the form p^2 + pq + q^2 and p and q are also twin primes.

This page as a plain text file.
%I A270249 #20 Feb 27 2023 16:00:39
%S A270249 109,433,2056753,3121201,3577393,26462701,37340353,43823053,128786113,
%T A270249 202705201,304093873,888345793,1005988033,1399680001,1537437133,
%U A270249 2282300173,2310187501,2444964913,2929312513,3564542701,5831255233,7950571201,8512439473,9346947373,9648752833,12627464653,15624660673
%N A270249 Greater of a pair of twin primes (r,s=r+2) where s is of the form p^2 + pq + q^2 and p and q are also twin primes.
%C A270249 Subsequence of A243761.
%C A270249 How is the distribution of terms of this sequence? With this form p^2 + pq + q^2, do twin primes generate bigger twin primes infinitely many times?
%e A270249 109 is a term because 109 and 107 are twin primes and 109 = 5^2 + 5*7 + 7^2, 5 and 7 are also twin primes.
%e A270249 433 is a term because 433 and 431 are twin primes and 433 = 11^2 + 11*13 + 13^2, 11 and 13 are also twin primes.
%o A270249 (PARI) t(n, p=3) = {while( p+2 < (p=nextprime( p+1 )) || n-->0, ); p-2}
%o A270249 for(n=1, 1e3, if(ispseudoprime(P=(3*t(n)^2 + 6*t(n) + 4)) && ispseudoprime(P-2), print1(P, ", ")));
%o A270249 (Python)
%o A270249 from itertools import islice
%o A270249 from sympy import isprime, nextprime
%o A270249 def A270249_gen(): # generator of terms
%o A270249     p, q = 2, 3
%o A270249     while True:
%o A270249         if q-p == 2 and isprime(s:=3*p*q+4) and isprime(s-2):
%o A270249             yield s
%o A270249         p, q = q, nextprime(q)
%o A270249 A270249_list = list(islice(A270249_gen(),20)) # _Chai Wah Wu_, Feb 27 2023
%Y A270249 Cf. A001359, A243761.
%K A270249 nonn
%O A270249 1,1
%A A270249 _Altug Alkan_, Mar 14 2016