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.

A354691 Numbers k with the property that 4*p+q and 4*q+p are primes, where p = prime(k) and q = prime(k+1).

This page as a plain text file.
%I A354691 #8 Jun 04 2022 19:40:51
%S A354691 2,23,74,86,91,96,97,99,100,105,133,174,280,305,357,372,504,554,562,
%T A354691 565,660,668,686,716,733,741,789,796,859,885,909,925,993,1021,1103,
%U A354691 1131,1136,1144,1191,1215,1234,1248,1285,1326,1334,1414,1503,1559,1577,1590,1607,1656,1738,1751,1822,1847,1894,1929,2088,2090
%N A354691 Numbers k with the property that 4*p+q and 4*q+p are primes, where p = prime(k) and q = prime(k+1).
%t A354691 sp = {}; sq = {}; Do[p = Prime[k]; q = NextPrime[p];
%t A354691   If[PrimeQ[4*p + q], AppendTo[sp, k]];
%t A354691   If[PrimeQ[4*q + p], AppendTo[sq, k]], {k, 10000}]; Intersection[sp, sq]
%o A354691 (Python)
%o A354691 from itertools import islice
%o A354691 from sympy import isprime, nextprime
%o A354691 def agen(): # generator of terms
%o A354691     k, p, q = 1, 2, 3
%o A354691     while True:
%o A354691         if isprime(4*p+q) and isprime(4*q+p):
%o A354691             yield k
%o A354691         k, p, q = k+1, q, nextprime(q)
%o A354691 print(list(islice(agen(), 60))) # _Michael S. Branicky_, Jun 03 2022
%K A354691 nonn
%O A354691 1,1
%A A354691 _Zak Seidov_, Jun 03 2022