Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A084673
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A084673 Smallest prime with n duplicate digits. +0
3
2, 11, 1117, 10111, 101111, 1111151, 11110111, 101111111, 1111111121, 11111111113, 101111111111, 1111111118111, 11111111111411, 111111111116111, 1111111111111181, 11111111101111111, 101111111111111111 (list; graph; listen)
OFFSET

1,1

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}]

CROSSREFS

Cf. A034388, A037055, A065584, A065821.

Sequence in context: A000886 A128855 A011825 this_sequence A034388 A131316 A062636

Adjacent sequences: A084670 A084671 A084672 this_sequence A084674 A084675 A084676

KEYWORD

nonn,base

AUTHOR

Harvey P. Dale (hpd1(AT)nyu.edu), Jun 29 2003

EXTENSIONS

Edited and extended by Robert G. Wilson v (rgwv(AT)rgwv.com), Jul 03 2003

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified July 24 12:00 EDT 2008. Contains 142294 sequences.


AT&T Labs Research