login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A178928
Smallest semiprime containing leading sequence of n ascending numbers.
0
10, 121, 123, 1234, 123451, 1234561, 1234567, 123456782, 12345678911, 123456789101, 123456789101117, 12345678910111229, 123456789101112133, 123456789101112131414, 1234567891011121314159
OFFSET
1,1
COMMENTS
This is to semiprimes A001358 as A053546 is to primes A000040.
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