mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Puzzles (https://www.mersenneforum.org/forumdisplay.php?f=18)
-   -   Primes in π (https://www.mersenneforum.org/showthread.php?t=16978)

Batalov 2012-07-16 20:54

For 62, the PRP is 3490-digit.
For 81, the PRP is 4834-digit.
For 84, the PRP is 3057-digit.

(these would be easy to prove prime)

henryzz 2012-07-16 21:22

[QUOTE=Batalov;304950]For 62, the PRP is 3490-digit.
For 81, the PRP is 4834-digit.
For 84, the PRP is 3057-digit.

(these would be easy to prove prime)[/QUOTE]

How far are you testing?

Batalov 2012-07-16 21:25

I have 50000 Pi digits dumped from gp and then prefiltered by a simple perl script that takes care of small factors of 2,5 (easy!) and 3 (simple sum of digits). 7 and 11 could be easily added but is not of significant help.

Then the candidate file goes to pfgw -f. All very easy, very 'umble.

For 20, 80, 96 and 98, the PRPs would be larger than 30,000 digits now.

Random Poster 2012-07-17 07:17

[QUOTE=Batalov;304937]Would you care to expand on this?
How would you move on from the first instance to the next one?
By proof?[/QUOTE]
By using a not-completely-insane method. In the outer loop, you take the first N digits of pi; in the inner loop, you take the last M digits of those N digits and test if that number begins with the specified digit(s) and is prime. Optimizations are possible: the outer loop can skip those N where the last digit is even, and the inner loop can keep a table of the positions of the starting digit(s).

Batalov 2012-07-17 07:57

That's not what I meant. The inner loop is already done to death. You simply cannot use the outer loop (as the problem is stated).

Suppose we are searching for a(20).
[CODE]pi = 3.
14159265358979323846264338327950288419716939937510
58[COLOR=darkred][B]20[/B]974944592307[/COLOR]816406286[COLOR=blue][B]20[/B]8998628034[/COLOR]8253421170679
82148086513282306647093844609550582231725359408128
48111745028410270193852110555964462294895493038196...
[/CODE]
Suppose we've checked the substrings starting from the red [COLOR=darkred][B]20[/B][/COLOR] up to a length of million and didn't find a prime. That doesn't give us the right to move on to the blue [COLOR=blue][B]20[/B][/COLOR], find [COLOR=blue][B]20[/B]89[/COLOR] and say that we are done.
We can only move on to the next instance of the starting point [I]after[/I] we have proven that there are no primes formed by the first instance. Can we prove that?

axn 2012-07-17 08:21

Do you (the general "you") define the "first prime instance" using the starting position or the ending position?

Explicit clarification is called for.

Batalov 2012-07-17 08:29

The problem is stated somewhat loosely and is open to interpretations.
Clearly we can all agree that the first, say, '3' after the prefix is not what OP intended. (Even though he wrote, "the first prime constructed from the subsequent digits".)

But I can see how you can interpret that as the string becomes longer it absorbes more instances of the prefix and you can hop onto that prefix. I think that this variant is too easy. It probably can be solved up to 5-6-digit values. Too easy.

Indeed, I am interested in the hard variant (For a given number [I]n[/I], find the leftmost instance of a prime substring in decimal expansion of pi that starts with [I]n[/I].) It can still be not the first useable prefix.

P.S. For the easy interpretation, 1 --> 41, isn't it? Maybe not (that's yet another interpretation).
But surely, for the easy interpretation, 9 --> 97

bsquared 2012-07-17 15:14

[QUOTE=Batalov;305006]T
We can only move on to the next instance of the starting point [I]after[/I] we have proven that there are no primes formed by the first instance. Can we prove that?[/QUOTE]

IANANT, but the infinite sum of 1/ln(n) diverges, so even accounting for the fact that on average we only sum 4 of every 10 terms, I would think that the probability that there exists a prime would be 1.

edit: here is where it would be nice for RDS to come around, slap me upside the head, and give a correct answer. I just put my $0.02 worth of thought into it.

Batalov 2012-07-17 18:26

80 -> 8034825342...6216977871[SUB]<41938>[/SUB]

Formula: floor(Pi*10^42021)%(10^41938). (Submitted to Lifchitz&Lifchitz...)

edit: I just put my $0.25 in the swear jar. B->

davar55 2012-07-17 20:42

Indeed, the problem being solved by Batalov and henryzz et.al.
is the one I intended in the OP. Only if no prime exists in pi at
a found point should the next occurrence of the integer be used.

I see why this wasn't all clear in the OP.

Dubslow 2012-07-18 03:00

I Am Not A National Treasure???


All times are UTC. The time now is 13:59.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.