6
\$\begingroup\$

Find a way to output a large integer with few characters. Solutions will be scored based on the magnitude of the number and shortness of code.

EDIT: Let's impose a time limit of a minute on sensible hardware, where sensible is a PC you can buy off the shelves.

\$\endgroup\$
  • 9
    \$\begingroup\$ So much for Ackerman(9,9) :P \$\endgroup\$ – JPvdMerwe Jan 29 '11 at 12:14
  • 3
    \$\begingroup\$ Note that the results highly depend on the output device (/dev/stdout - slowest since it involves graphics, /dev/null - fastest cause it doesn't do anything, | wc -l - medium). \$\endgroup\$ – Alexandru Jan 29 '11 at 17:28
  • 16
    \$\begingroup\$ print '10' - since you haven't specified the base, this is using base-Graham's Number \$\endgroup\$ – Skizz Mar 10 '11 at 11:38
  • 6
    \$\begingroup\$ The question should either restrict the size of the code what is the highest number with 100 bytes of code, or enforce a minimum number generate a number, at least 9^1000) as pure digits with as few code as you can. Searching for minimum and maximum the same time would need a conversion function, how to judge on smaller numbers generated with less code, since you cannot ensure that the shortest code will generate the largest number automatically. \$\endgroup\$ – user unknown Apr 12 '11 at 0:09
  • 2
    \$\begingroup\$ Voted to close as not constructive. One year, and still no winning criteria. \$\endgroup\$ – user unknown Jan 14 '12 at 1:36

33 Answers 33

0
\$\begingroup\$

Python, 21 characters

print "10"+"^10"*1337

"output a large integer"

It has 10 to the power of 10 repeated 1336 times (Tetration) number of zeros with a leading 1.

\$\endgroup\$
0
\$\begingroup\$

Windows x86 .com

8 bytes

B4 02 B2 39 CD 21 EB F8
\$\endgroup\$
0
\$\begingroup\$

Interpreted Haskell using tryhaskell.org, 10 characters, 5120 digits

0xF^0xFFFF
\$\endgroup\$
  • \$\begingroup\$ That interpreter seems to truncate the output, which should be the 77076 digits of 15^65535. Notice that 999^999999 also has ten characters and should produce 2999563 digits. \$\endgroup\$ – r.e.s. Jun 19 '12 at 13:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.