A363074 Prime numbers that are the exact average of two consecutive odd semiprimes.
23, 29, 37, 53, 61, 67, 73, 89, 103, 113, 131, 137, 157, 173, 211, 251, 277, 293, 307, 337, 379, 409, 449, 461, 487, 491, 499, 503, 523, 569, 617, 631, 661, 683, 701, 719, 727, 751, 769, 787, 919, 941, 953, 991, 1009, 1019, 1039, 1051, 1063, 1117, 1153, 1193, 1201, 1223, 1259, 1279, 1289, 1381, 1399
Offset: 1
Keywords
Examples
23 is a term because (21 + 25)/2 = 23 is prime. 29 is a term because (25 + 33)/2 = 29 is prime.
Programs
-
Mathematica
Select[Plus @@@ Partition[Select[Range[1, 1410, 2], PrimeOmega[#] == 2 &], 2, 1] / 2, PrimeQ] (* Amiram Eldar, May 21 2023 *)
-
Python
from itertools import count, islice from sympy import factorint, isprime def semiprime(n): return sum(e for e in factorint(n).values()) == 2 def nextoddsemiprime(n): return next(k for k in count(n+1+(n&1), 2) if semiprime(k)) def agen(): # generator of terms osp = [9, 15] while True: q, r = divmod(sum(osp), len(osp)) if r == 0 and isprime(q): yield q osp = osp[1:] + [nextoddsemiprime(osp[-1])] print(list(islice(agen(), 59))) # Michael S. Branicky, May 21 2023