A087331 Smallest number with all identical digits having n distinct prime divisors.
1, 2, 6, 66, 6666, 111111, 222222, 111111111111, 222222222222, 222222222222222222, 111111111111111111111111, 222222222222222222222222, 22222222222222222222222222222222, 111111111111111111111111111111
Offset: 1
Examples
a(6) = 22222222 because the 6 distinct prime divisors of a(6) are 2, 3, 7, 11, 13, and 37.
Programs
-
Mathematica
PrimeFactors[n_Integer] := Flatten[ Table[ # [[1]], {1}] & /@ FactorInteger[n]]; Do[k = 1; While[t = Table[j*(10^k - 1)/9, {j, 1, 9}]; l = Map[ Length, Map[ PrimeFactors, t]]; Position[l, n] == {}, k++ ]; Print[ t[[Position[l, n] [[1, 1]]]]], {n, 0, 13}]
Extensions
Edited, corrected and extended by Robert G. Wilson v, Sep 06 2003
Comments