OFFSET
1,1
COMMENTS
For n > 1, conjectured to be equal to A037055(n), the smallest prime in { R-10^n, R-10^(n-1), ..., R-10; R+a*10^b, a = 1, ..., 8, b = 0, 1, 2, ..., n }, where R = (10^(n+1)-1)/9 is the (n+1)-digit repunit. - M. F. Hasler, Feb 25 2016
REFERENCES
Liz Strachan, Numbers are Forever, Mathematical Facts and Curiosities, Constable, London, 2014, page 267.
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1000
EXAMPLE
a(4)=10111 because 10111 is the smallest prime with four duplicate digits.
MATHEMATICA
Table[ First[ Select[ Prime[ Range[100000]], Max[ DigitCount[ # ]]==i & ]], {i, 6}] (* or *)
f[n_, b_] := Block[{k = 10^(n + 1), p = Permutations[ Join[ Table[ b, {i, 1, n}], {x}]], c = Complement[ Table[j, {j, 0, 9}], {b}], q = {}}, Do[q = Append[q, Replace[p, x -> c[[i]], 2]], {i, 1, 9}]; r = Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]; If[ r != Infinity, r, While[ !PrimeQ[k] || Count[ IntegerDigits[k], b] != n, k++ ]; k]]; Table[ f[n, 1], {n, 2, 18}]
PROG
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Harvey P. Dale, Jun 29 2003
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jul 03 2003
STATUS
approved