A088628 Smallest prime using all the digits of first n numbers. If necessary, extra digits can be used.
11, 127, 1123, 1423, 112543, 1124653, 1234657, 112345687, 1123465789, 10123457689, 10111123456879, 1011111223457689, 10111112233469857, 10111111122334456879, 1011111111223344557689, 10111111112233445569867
Offset: 1
Examples
a(5) = 112543 which is the smallest prime containing digits 1 to 5. a(10) = 10123457689 is the smallest prime containing digits of 1,2,3,4,5,6,7,8,9 and 10.
Links
- Ray Chandler, Table of n, a(n) for n = 1..369 (terms < 10^1000)
- Ray Chandler, Mathematica program for A088628
Programs
-
Mathematica
For a(11): d = {1, 0, 1, 1, 1, 1, 1, 2, 2, 3, 4}; a = Map[ FromDigits, Join[ d, # ] & /@ Permutations[{5, 6, 7, 8, 9}]]; Min[ Select[ a, PrimeQ[ # ] & ]] (* Robert G. Wilson v, Nov 06 2003 *) (* See above link for another program *)
Extensions
a(8) and a(9) from Robert G. Wilson v, Oct 22 2003
a(10) from Ray Chandler, Nov 01 2003
a(11) through a(16) from Robert G. Wilson v, Nov 06 2003
Comments