The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A098449 Smallest n-digit semiprime. 5
4, 10, 106, 1003, 10001, 100001, 1000001, 10000001, 100000001, 1000000006, 10000000003, 100000000007, 1000000000007, 10000000000015, 100000000000013, 1000000000000003, 10000000000000003, 100000000000000015, 1000000000000000007, 10000000000000000001 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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, 19, 0] (* Robert G. Wilson v, Dec 18 2012 *)
PROG
(PARI)
a(n)=for(k=10^(n-1), 10^n-1, if(bigomega(k)==2, return(k)))
vector(50, n, a(n)) \\ Derek Orr, Aug 15 2014
(Python)
from sympy import factorint
def semiprime(n): f = factorint(n); return sum(f[p] for p in f) == 2
def a(n):
an = max(1, 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. A098450 (largest n-digit semiprime), A003617 (smallest n-digit prime), A001358 (semiprimes).
Sequence in context: A197851 A197865 A267128 * A118378 A203224 A198156
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 1 03:43 EDT 2024. Contains 373008 sequences. (Running on oeis4.)