D
Daniel Yoo
: According to latest news the largest known prime is:
: 2**24036583 - 1
: (right?)
: Do someone of you know how long would it take on
: a 2.8 GHz Pentium 4 machine to write a _decimal_ form
: (hexadecimal form can be written in less than one second)
: of this prime to a file and what should be the Python code
: to use for it?
Hi Claudio,
Let's see... how many digits would it be?
###.... return int(math.log(n) / math.log(10)) + 1
....733485
###
Ok, that doesn't sound too bad at all. It's about 750,000 digits long.
It's actually not difficult to get the last decimal digit of this
humongous number:
###7L
###
It's also not too difficult to get the second to last digit of this
number:
###0L
###
At least we can figure out that the number ends with a '07'. If we
continue this way, we can quickly get the other digits.
Hope this helps!
: 2**24036583 - 1
: (right?)
: Do someone of you know how long would it take on
: a 2.8 GHz Pentium 4 machine to write a _decimal_ form
: (hexadecimal form can be written in less than one second)
: of this prime to a file and what should be the Python code
: to use for it?
Hi Claudio,
Let's see... how many digits would it be?
###.... return int(math.log(n) / math.log(10)) + 1
....733485
###
Ok, that doesn't sound too bad at all. It's about 750,000 digits long.
It's actually not difficult to get the last decimal digit of this
humongous number:
###7L
###
It's also not too difficult to get the second to last digit of this
number:
###0L
###
At least we can figure out that the number ends with a '07'. If we
continue this way, we can quickly get the other digits.
Hope this helps!