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 A213025 #33 Jul 31 2025 15:35:45 %S A213025 34,86,94,122,142,185,194,202,214,218,262,289,302,314,321,358,371,394, %T A213025 407,413,415,422,446,471,489,493,497,517,535,562,581,586,626,634,669, %U A213025 687,698,734,785,791,815,838,842,922,982,989,1042,1057,1079,1135,1138 %N A213025 Balanced semiprimes (of order one): semiprimes which are the average of the previous semiprime and the following semiprime. %C A213025 Semiprimes that are the average of three successive semiprimes. %C A213025 First term not also in A086005 is 185. - _Alonso del Arte_, Jun 04 2012 %H A213025 Alois P. Heinz, <a href="/A213025/b213025.txt">Table of n, a(n) for n = 1..10000</a> %H A213025 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Semiprime.html">Semiprime</a> %F A213025 2*sp_(n) = sp_(n - 1) + sp_(n + 1). %F A213025 a(n) = (1/3) * (sp(i) + sp(i + 1) + sp(i + 2)), for some i(n). %e A213025 194 is in the sequence because 194 = (187 + 194 + 201)/3 = (A001358(61) + A001358(62) + A001358(63))/3. %p A213025 with(numtheory): %p A213025 prevsp:= proc(n) local k; for k from n-1 by -1 %p A213025 while isprime(k) or bigomega(k)<>2 do od; k end: %p A213025 nextsp:= proc(n) local k; for k from n+1 %p A213025 while isprime(k) or bigomega(k)<>2 do od; k end: %p A213025 a:= proc(n) option remember; local s; %p A213025 s:= `if`(n=1, 4, a(n-1)); %p A213025 do s:= nextsp(s); %p A213025 if s=(prevsp(s)+nextsp(s))/2 then break fi %p A213025 od; s %p A213025 end: %p A213025 seq (a(n), n=1..100); # _Alois P. Heinz_, Jun 03 2012 %t A213025 bspQ[{a_,b_,c_}]:=b==(a+c)/2; With[{sp=Select[Range[1200],PrimeOmega[#] == 2&]}, Transpose[Select[Partition[sp,3,1],bspQ]][[2]]] (* _Harvey P. Dale_, Nov 18 2012 *) %t A213025 Select[Partition[Select[Range[1200],PrimeOmega[#]==2&],3,1],Mean[#]==#[[2]]&][[;;,2]] (* _Harvey P. Dale_, Jul 31 2025 *) %o A213025 (Haskell) %o A213025 a213025 n = a213025_list !! (n-1) %o A213025 a213025_list = f a001358_list where %o A213025 f (x:sps'@(y:z:sps)) | 2 * y == (x + z) = y : f sps' %o A213025 | otherwise = f sps' %o A213025 -- _Reinhard Zumkeller_, Jun 10 2012 %Y A213025 Cf. A086005 (subsequence), A001358, A006562, A065516, A212820. %K A213025 nonn %O A213025 1,1 %A A213025 _Gerasimov Sergey_, Jun 03 2012