Page 1 of 1

Problem 308

Posted: Mon Nov 01, 2010 3:03 am
by kingvash
I am having difficulty counting the number of iterations (it may be just a fence post problem).

Could anyone confirm that it takes takes:
19 iterations to produce 2 ^ 2
36980 iterations to produce 2 ^ 29
73886466 iterations to produce 2 ^ 379

Thanks.

Re: Problem 308

Posted: Mon Nov 01, 2010 3:10 am
by sivakd
I haven't solved it yet. I have a basic algorithm that can generate the primes but it would take a lot of time to find the answer being asked. In your case, the first one is correct. But the remaining two are off by 1.

Edit: I can now confirm my above statement after solving this problem.

Re: Problem 308

Posted: Thu Jan 20, 2011 9:21 pm
by dstrower
Did you have any difficulty in getting the program to run in under a minute?

Re: Problem 308

Posted: Tue Feb 22, 2011 10:37 pm
by raggie
Is an unsigned 32 (or 64) bit integer enough to store the answer?

Re: Problem 308

Posted: Wed Feb 23, 2011 10:17 am
by hk
32: no. 64: yes.

Re: Problem 308

Posted: Thu Jul 19, 2018 3:27 pm
by Oliver1978
There seem to exist two valid versions. Version A takes 707 steps to find 2^7, Version B takes 710 steps.

On which of those does the correct solution rely?

Re: Problem 308

Posted: Thu Jul 19, 2018 5:23 pm
by kenbrooker
I vote for 710...

Re: Problem 308

Posted: Thu Jul 19, 2018 7:39 pm
by Oliver1978
Is that vote because you've already solved this? Or just a guess...

Re: Problem 308

Posted: Thu Jul 19, 2018 11:10 pm
by kenbrooker
Solved, but you never know...

Re: Problem 308

Posted: Thu Jul 19, 2018 11:32 pm
by Oliver1978
Apparently it's the slow branch then. Thanks :)