How to get decimal form of largest known prime?

Irmen de Jong irmen at -nospam-remove-this-xs4all.nl
Thu Jun 10 18:44:26 EDT 2004


Daniel Yoo wrote:
>>>>x = 2**2436583 - 1
[...]

>>>>(x / 10) % 10
> 
> 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.
                             ^^^^^^^
Sadly, no you can't. Just try it ;-)

 >>> i=1
 >>> while True:
...  print (x/i)%10,
...  i*=10
...
7 0 4 9 6 9 5 4 4 4 1 8...... slower and slower.....

--Irmen



More information about the Python-list mailing list