The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A098450 Largest n-digit semiprime. 6
 9, 95, 998, 9998, 99998, 999997, 9999998, 99999997, 999999991, 9999999997, 99999999997, 999999999997, 9999999999989, 99999999999997, 999999999999998, 9999999999999994, 99999999999999989, 999999999999999993, 9999999999999999991, 99999999999999999983 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Amiram Eldar, Table of n, a(n) for n = 1..100 FORMULA a(n) = 10^n - A119320(n). - Amiram Eldar, Sep 18 2021 MATHEMATICA 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 *) PROG (PARI) apply( A098450(n)={n=10^n; until(bigomega(n-=1)==2, ); n}, [1..20]) \\ M. F. Hasler, Jan 01 2021 (Python) from sympy import factorint def semiprime(n): f = factorint(n); return sum(f[p] for p in f) == 2 def a(n): an = 10**n - 1 while not semiprime(an): an -= 1 return an print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Apr 10 2021 CROSSREFS Cf. A098449 (smallest n-digit semiprime), A003618 (largest n-digit prime), A001358 (semiprimes), A119320. Sequence in context: A000562 A193216 A213019 * A337269 A065456 A052389 Adjacent sequences: A098447 A098448 A098449 * A098451 A098452 A098453 KEYWORD base,nonn AUTHOR Rick L. Shepherd, Sep 07 2004 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 6 22:48 EDT 2024. Contains 375002 sequences. (Running on oeis4.)