Not a "Coincidence" Again!

0. 029 031 037 047 061 079 101 127 157 0. \,\ 029 \,\ 031 \,\ 037 \,\ 047 \,\ 061 \,\ 079 \,\ 101 \,\ 127 \,\ 157 \dots

Above shows the first few digits decimal expansion of 28944031 997002999 \large{\frac{28944031}{997002999}} , written in groups of 3.

If we split this decimal expansion into groups of 3 we see multiple primes appearing! However these primes end at a certain point. After how many decimal (digits) does this pattern cease?

Details and Assumptions :

  • If you think the number equals to 0. 029 031 037 047 063 0.\ 029 \,\ 031 \,\ 037 \,\ 047 \,\ 063 , then you can only find the five prime numbers. So we can only find 4 positive prime numbers before the pattern breaks off. Thus the pattern breaks off after 12 decimal digits.

Inspired by Garret C. , Pi Han Goh and Daniel Liu .


The answer is 66.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Josh Speckman
Jul 11, 2015

Clearly the intended answer is bash away and hope it's not like 300. So we bash

The given fraction is equivalent to approximately 0.029031037047061079101127157191229271317367421479541607677751829911998 0.029031037047061079101127157191229271317367421479541607677751829911 998 plus some stuff. We chunk this into triplets, and eventually get the triplet 998 998 , which is clearly not prime. Thus, we just have to check all of the numbers before it. We find that none of the previous numbers are composite, so 998 998 is the first composite chunk, and we count to get 66 66 .

Seriously, though, what is the intended solution? I can't think of anything that feels useful.

David Peterson
Sep 3, 2015

n=1;

while isprime(floor(28944031/997002999 10^(3n)) - floor(28944031/997002999 10^(3 (n-1))) 10^(3))

n++;

cout << 3*n;

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...