| 1 | initial version |
Here is an other possibility:
sage: import random
sage: random.getrandbits(167)
96541868459945240442714629364038017535847363449131L
sage: ZZ(_)
96541868459945240442714629364038017535847363449131
sage: len(str(_))
50 (Well, 51 decimal digits will also occur... I hope this is not an issue in the further application.)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.