|
|
|
|
|
by darkmighty
3434 days ago
|
|
What about the following? x=5
y=5
while True:
if y%2 == 0:
y=y/2
else:
y=3y+1
if y == 1:
x=x+1
y=x
if y==x:
return x
Please predict the code. I'll even give you $500 in memory of some guy named Erdos if you get it right (and I haven't even gone for a provably undecidable example! :) )PS: Don't waste time checking x values less than 1000000000000000000 |
|
If your asking the underlying math problem, yes that is true for all positive integers. It's much more obvious in base 3.