There is a interesting nature in numbers: say positive integers n
if we do the operations as follows to this n, interesting nature appear
if n is even number→ divide n by 2
if n is odd number → multiple by 3 and add 1
any number will be "1" after these instructions. there is not yet proof of this mathmatical nature. And I wrote a program to test large variety of numbers ranging from 1 to 1000000. but if n is 113383, the program stops. I first did not know why. but as I google that, I understood that there is a limit of number that can "int" can hold, and "113383" overflows that limit.
0 件のコメント:
コメントを投稿