OFFSET
0,1
LINKS
EXAMPLE
a(0)=9 because 9=3*3 is the first odd semiprime following 10^0=1.
a(13) = 10000000000015 = 5*2000000000003.
MATHEMATICA
osp[n_]:=Module[{k=1}, While[PrimeOmega[n+k]!=2, k=k+2]; n+k]; Join[{9}, Table[osp[10^i], {i, 20}]] (* Harvey P. Dale, Jan 17 2012 *)
PROG
(PARI) print1(9, ", "); for(n=1, 10, forstep(i=10^n+1, 10^(n+1)-1, 2, f=factor(i); ms=matsize(f); if((ms[1]==1&&f[1, 2]==2)||(ms[1]==2&&f[1, 2]==1&&f[2, 2]==1), print1(i, ", "); break))) /* Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 21 2006 */
(Python)
from sympy import factorint, nextprime
def is_semiprime(n): return sum(e for e in factorint(n).values()) == 2
def next_odd_semiprime(n):
nxt = n + 1 + n%2
while not is_semiprime(nxt): nxt += 2
return nxt
def a(n): return next_odd_semiprime(10**n)
print([a(n) for n in range(20)]) # Michael S. Branicky, Sep 15 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Aug 28 2004
STATUS
approved