I was toying with some math principals the other day. It's amazing how what seems to be some 'simple' input can turn out such extreme numbers.
The first part had to do with the digit sum of numbers (in the decimal system). For example, the digit sum of 31495 would be 3+1+4+9+5=22. However, there is an infinite variety of numbers having that same digit sum. The main idea was to find the smallest number having a given digit sum. In this case, the smallest one would be 499 (4+9+9=22).
The next part had to do with the Fibonacci sequence. For those not familiar with it, it starts with 0 and 1 as the first two numbers in the sequence. The next number is obtained by adding the previous two numbers, giving:
0,1,1,2,3,5,8,13,21,34,55,...
55 being the tenth one and denoted as F
10.
Although F
90 is not a small number by any means, it still fits within the 64-bit binary format. But, the smallest number which would have a digit sum equal to F
90 would be so big that if you wanted to print it on a strip of paper with letter-size width, 100 characters per line, 100 lines per foot, that strip of paper would reach well beyond the orbit of Pluto. AND, if you had a super fast printer which could produce at a rate of 100 feet/second, it would take some 4.5 million years to finish the job!!!
