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 A098450 #17 Sep 18 2021 07:17:05 %S A098450 9,95,998,9998,99998,999997,9999998,99999997,999999991,9999999997, %T A098450 99999999997,999999999997,9999999999989,99999999999997, %U A098450 999999999999998,9999999999999994,99999999999999989,999999999999999993,9999999999999999991,99999999999999999983 %N A098450 Largest n-digit semiprime. %H A098450 Amiram Eldar, <a href="/A098450/b098450.txt">Table of n, a(n) for n = 1..100</a> %F A098450 a(n) = 10^n - A119320(n). - _Amiram Eldar_, Sep 18 2021 %t A098450 NextSemiPrime[n_, k_: 1] := Block[{c = 0, sgn = Sign[k]}, sp = n + sgn; While[c < Abs[k], While[ PrimeOmega[sp] != 2, If[sgn < 0, sp--, sp++]]; If[sgn < 0, sp--, sp++]; c++]; sp + If[sgn < 0, 1, -1]]; f[n_] := NextSemiPrime[10^n, -1]; Array[f, 18] (* _Robert G. Wilson v_, Dec 18 2012 *) %o A098450 (PARI) apply( A098450(n)={n=10^n;until(bigomega(n-=1)==2,);n}, [1..20]) \\ _M. F. Hasler_, Jan 01 2021 %o A098450 (Python) %o A098450 from sympy import factorint %o A098450 def semiprime(n): f = factorint(n); return sum(f[p] for p in f) == 2 %o A098450 def a(n): %o A098450 an = 10**n - 1 %o A098450 while not semiprime(an): an -= 1 %o A098450 return an %o A098450 print([a(n) for n in range(1, 21)]) # _Michael S. Branicky_, Apr 10 2021 %Y A098450 Cf. A098449 (smallest n-digit semiprime), A003618 (largest n-digit prime), A001358 (semiprimes), A119320. %K A098450 base,nonn %O A098450 1,1 %A A098450 _Rick L. Shepherd_, Sep 07 2004