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.
%I A363187 #25 Jul 11 2023 11:28:00 %S A363187 31,41,59,83,107,139,163,191,197,281,311,383,397,443,521,673,677,757, %T A363187 821,887,997,1061,1109,1151,1171,1229,1237,1373,1423,1453,1619,1823, %U A363187 1889,1931,2053,2141,2203,2221,2309,2339,2437,2473,2477,2749,2801,2837,2953,3019,3119,3163,3209,3257,3347 %N A363187 Prime numbers that are the average of three consecutive odd semiprimes. %H A363187 Gabriel Whigham, <a href="/A363187/b363187.txt">Table of n, a(n) for n = 1..10000</a> %e A363187 31 is a term because (25 + 33 + 35)/3 = 31 is prime. %e A363187 41 is a term because (35 + 39 + 49)/3 = 41 is prime. %p A363187 OP:= select(isprime, [seq(i, i=3..10000, 2)]): %p A363187 OSP:= sort(select(`<=`, [seq(seq(OP[i]*OP[j], j=1..i), i=1..nops(OP))], 3*OP[-1])): %p A363187 SA:= [seq(add(OSP[i+j], j=0..2)/3, i=1..nops(OSP)-2)]: %p A363187 select(t -> t::integer and isprime(t), SA); # _Robert Israel_, May 22 2023 %t A363187 Select[Plus @@@ Partition[Select[Range[1, 3400, 2], PrimeOmega[#] == 2 &], 3, 1] / 3, PrimeQ] (* _Amiram Eldar_, May 21 2023 *) %o A363187 (Python) %o A363187 from itertools import count, islice %o A363187 from sympy import factorint, isprime %o A363187 def semiprime(n): return sum(e for e in factorint(n).values()) == 2 %o A363187 def nextoddsemiprime(n): return next(k for k in count(n+1+(n&1), 2) if semiprime(k)) %o A363187 def agen(): # generator of terms %o A363187 osp = [9, 15, 21] %o A363187 while True: %o A363187 q, r = divmod(sum(osp), len(osp)) %o A363187 if r == 0 and isprime(q): %o A363187 yield q %o A363187 osp = osp[1:] + [nextoddsemiprime(osp[-1])] %o A363187 print(list(islice(agen(), 53))) # _Michael S. Branicky_, May 21 2023 %Y A363187 Cf. A000040, A046315. %Y A363187 Cf. A363074, A363188. %K A363187 nonn %O A363187 1,1 %A A363187 _Elmo R. Oliveira_, May 20 2023