Page 1 of 2

clarifying problem 200

Posted: Wed Oct 29, 2008 9:12 pm
by JamieCamardelle
Hi, thanks for keeping up such a great website. I just need to know, for problem 200, is it a valid change to turn the first digit into a zero? Just want to know because the change is drastic, creating a new number of one fewer digits than the other. Thanks.

Re: clarifying problem 200

Posted: Wed Oct 29, 2008 9:44 pm
by Tommy137
Yes, I think so. It's some time ago I solved this problem, but looking at my algorithm, I did turn the first digit into a zero, too.

Re: clarifying problem 200

Posted: Wed Oct 29, 2008 10:17 pm
by jaap
Leading zeroes are never allowed in any of the problems, including this one.
It might not make much difference here since most prime-proof numbers are even....

Re: clarifying problem 200

Posted: Wed Oct 29, 2008 10:19 pm
by quilan
I think he means checking if a number is prime-proof. In which case, according to my algorithm (and most of the others in the discussion), you can swap out a zero for the first digit. If this isn't intended behavior, then I guess it doesn't make a difference.

Re: clarifying problem 200

Posted: Wed Oct 29, 2008 10:32 pm
by jaap
quilan wrote:I think he means checking if a number is prime-proof. In which case, according to my algorithm (and most of the others in the discussion), you can swap out a zero for the first digit.
A string of digits that starts with a zero is strictly speaking not a number so checking whether it is prime or not does not make sense.
My program never changed the first digit to zero. I think it happens to be the case that it doesn't matter in this problem.

Re: clarifying problem 200

Posted: Wed Oct 29, 2008 10:41 pm
by Tommy137
jaap wrote:Leading zeroes are never allowed in any of the problems
You're right, of course.

I wonder why it didn't come to my mind, when I coded my program. Obviously I just started to write it, then run it and checked the solution :D

Re: clarifying problem 200

Posted: Thu Oct 30, 2008 12:49 am
by JamieCamardelle
Thanks for the answers. It seems I can go about it either way.

Problem 200

Posted: Tue Dec 09, 2008 4:13 am
by uws8505
Is there any odd prime-proof sqube which contains the contiguous sub-string "200"?

Re: Problem 200

Posted: Tue Dec 09, 2008 7:26 am
by DNS
Yes, there is

Re: Problem 200

Posted: Tue Mar 31, 2009 3:59 pm
by ImRe
Could somebody explain me what is this "changing a single digit to make it prime" thing?

Thx.

Re: Problem 200

Posted: Tue Mar 31, 2009 4:28 pm
by quilan
For example 72, the following are prime numbers:
71, 73, 79

For 200 none of the following are prime numbers:
100,200,300,...,900
200,210,220,...,290
200,201,202,...,209

Thus, 72 can change one digit to make it a prime, but 200 can never change only one digit to make it a prime and thus is prime-proof.

Re: Problem 200

Posted: Thu Jul 07, 2011 4:24 pm
by BostonBear
I am confused about the precise definition of "sub-string" in this problem. does that mean the sqube can NOT either Start or End with "200"?

Re: Problem 200

Posted: Thu Jul 07, 2011 6:09 pm
by jaap
BostonBear wrote:I am confused about the precise definition of "sub-string" in this problem. does that mean the sqube can NOT either Start or End with "200"?
The "200" can be at the start, middle, or end (or can even occur multiple times). Sub-string simply means that the three digits "2", "0", and "0" must be adjacent and in that order.

Re: Problem 200

Posted: Fri May 25, 2012 1:47 pm
by olopierpa
I must be doing something silly with this one (Problem 200 (View Problem))

Can someone kindly check if the first few numbers satisfying the conditions are the following?

(1 200)
(2 1992008)
(3 20047112)
(4 42120027)

Thanks!

Re: Problem 200

Posted: Fri May 25, 2012 3:24 pm
by thundre
olopierpa wrote:I must be doing something silly with this one (Problem 200 (View Problem))

Can someone kindly check if the first few numbers satisfying the conditions are the following?
That's a lot of results to post in a forum with a dancing header that says "In particular don't post any code fragments or results".

Your 4th number is not prime-proof. Add 400 and you get a prime.

Re: Problem 200

Posted: Fri May 25, 2012 3:57 pm
by olopierpa
Thanks for the help! (I have reduced the info posted, PM me if it's still not appropriate)

Re: Problem 200

Posted: Fri May 25, 2012 4:44 pm
by olopierpa
Done! :D

It was a silly one character mistake.

Now on to the problem thread, to see all the wonderful optimization opportunities I missed. :lol:

Re: Problem 200

Posted: Mon Aug 10, 2015 5:50 pm
by PhilLeTaxi
Hi,

Can someone tell me if the following squbes are correct ?

5th : 71952008
50th : 20074469192
100th : 102005604488

Re: Problem 200

Posted: Tue Aug 25, 2015 3:17 pm
by PhilLeTaxi
OK, I solved the problem. :D
The 50th and the 100th mentionned above were not correct.
The 50th is : 20016803528
The 100th is : 72007089032
In fact, I was stopping the search too earlier and missed some smaller squbes.

Re: Problem 200

Posted: Mon Apr 30, 2018 9:14 pm
by h_anand
How many primes should I generate?

I generated more than 203 million primes (sieved from ~4.29 billion numbers) but I could find only 26 prime-proof squbes containing 200.

The last of these 26 are:

<values removed by moderator>

Could someone please confirm whether my results are correct?