Monday, August 2, 2010

Contest: Primes with an unusual number of a digit

I'd like to propose a quick contest. Here are the rules:
  1. You must submit your entry by September 2, 2010, 23:59 (sorry, I can't wait until 2011, the next prime year)
  2. Your submission must be a sequence of decimal digits.
  3. The number that these represent must be prime (which make up (in order) a prime number. You may use a test like Rabin-Miller, which will be the method used to validate the submission. Note that it is therefore possible for the submission to fail such a test, even if it passed for the sumitter.
  4. The number must be composed of at least either 155 decimal digits or 512 bits (either will do).
  5. The winner will be the number which has the highest ratio of any one digit. For example, "23" has a 50% ratio of the digit "2" while 1011 has a 75% ratio of "1"
  6. You must send your entries to essay-contest@ajs.com
As an example, here is a number:

1074934746  0579280428  5352135601  3625508347  1908730962  4560090445  3404800574  5211453514  0988380000  3920392507  2147060801  0391490408  0059833120  1609426475  4887127734  07857

which has 31 zeros for a ratio of 20%. Obviously, your submission should seek to beat at least this relatively low number.

You can submit as many times as you like, but in order to avoid making me unhappy with you, I suggest waiting until the last minute (or whenever you decide to stop searching) and submit the best result you have by then.

The winner will get a lifetime subscription to this blog and their name prominently featured in the article in which the number is published.

For fun, I'll be writing my own solver in Rakudo Star Perl 6. It won't be very efficient, so I expect it to get seriously trounced, but I'll do it for the fun. Even if I find the best number, I'll publish the best submission from someone else.

2 comments:

  1. > 1011 has a 33.3% ratio of "1"

    Shouldn't this be 75% ratio? Or am I misunderstanding the definition of ratio here?

    ReplyDelete
  2. Two things: 1) Sundar, yes that was a typo. I've fixed it. 2) Someone pointed out that there are public databases of large, interesting primes, one of which is all 1s. I'm still interested in seeing what people come up with. A program that comes up with interesting solutions (or even that solution) would be great.

    ReplyDelete