We know the recent computers are 64-bit, and the maximum integer number is 18446744073709551615, whether you can find the first 21-digit prime number after the decimal point of $\pi$?
Please show me.
|
We know the recent computers are 64-bit, and the maximum integer number is 18446744073709551615, whether you can find the first 21-digit prime number after the decimal point of $\pi$? Please show me. |
|||||||||||
|
|
What you are looking for is sometimes called an infinite precision math library that allows you to extend the size of your numbers beyond the maximum representable by the word size of your CPU. Sometimes this is called an arbitrary precision library. Languages like Java, and say Python provide such capabilities. Computer Algebra Systems like Mathematica (as does WolframAlpha), Maple, Maxima and Gp/PARI have this capability built in. This and the answer by Ross should get you moving forward. You also need to decide on a primality test to use against your numbers and that should be something like Miller-Rabin followed by Lucas or other choices too depending on your needs. Regards. |
|||||||||||||
|
|
You can certainly start taking the batches of $21$ decimals and check them for primality. You start with $141592653589793238462$ which is clearly not prime as it is even. The first odd batch is $592653589793238462643=7^2×11×17203×624683×102317113$. One would expect about one in $45$ numbers of this size to be prime, so you shouldn't have to look far. You can check your favorite with Alpha The first one I find is $338327950288419716939$, checked with Alpha. Alpha is able to fully factor numbers of this size quickly. |
||||
|
|