login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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).
1
2, 23, 74, 86, 91, 96, 97, 99, 100, 105, 133, 174, 280, 305, 357, 372, 504, 554, 562, 565, 660, 668, 686, 716, 733, 741, 789, 796, 859, 885, 909, 925, 993, 1021, 1103, 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
OFFSET
1,1
MATHEMATICA
sp = {}; sq = {}; Do[p = Prime[k]; q = NextPrime[p];
If[PrimeQ[4*p + q], AppendTo[sp, k]];
If[PrimeQ[4*q + p], AppendTo[sq, k]], {k, 10000}]; Intersection[sp, sq]
PROG
(Python)
from itertools import islice
from sympy import isprime, nextprime
def agen(): # generator of terms
k, p, q = 1, 2, 3
while True:
if isprime(4*p+q) and isprime(4*q+p):
yield k
k, p, q = k+1, q, nextprime(q)
print(list(islice(agen(), 60))) # Michael S. Branicky, Jun 03 2022
CROSSREFS
Sequence in context: A226490 A217113 A042679 * A345701 A209194 A097232
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 03 2022
STATUS
approved