OFFSET
1,1
EXAMPLE
a(1) = 10 because 10 = 2 * 5 is the smallest semiprime (or biprime, products of two primes) whose leftmost (base 10) digit is 1.
a(2) = 121 because 121 = 11^2 semiprime whose leftmost digits are 12.
a(3) = 123 since it is a semiprime already.
a(4) = 1234 = 2 * 617.
a(5) = 123451 = 41 * 3011.
a(6) = 1234561 = 211 * 5851.
MATHEMATICA
semiPrimeQ[n_] := Plus @@ Last /@ FactorInteger@ n == 2; f[n_] := Block[{k = 0, m = FromDigits@ Flatten@ IntegerDigits@ Range@ n}, If[ semiPrimeQ@ m, , While[a = 10^(1 + Max[0, Floor@ Log10@ k]) m + k; ! semiPrimeQ@ a, k++]; m = a]; m]; Array[f, 15]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Dec 30 2010
STATUS
approved