Take any natural number n. If n is even, divide it by 2 to get n / 2,
if n is odd multiply it by 3 and add 1 to obtain 3n + 1.
Repeat the process (which has been called "Half Or Triple Plus One",
or HOTPO) indefinitely. The conjecture is that no matter what
number you start with, you will always eventually reach 1.
This program generates a sequence using the above rule given the first
number until the sequence reaches 1 the first time.
The other function of the program is to generate sequences with
starting numbers in the given interval, noting every time an equally
long or longer sequence is generated as well as each time a highest
number in a sequence is higher than the previous highest.
If the program don't run on your device, it may be due to lack of memory for the hash table used to speed up the calculation of the tables.
免費玩Collatz conjecture APP玩免費
免費玩Collatz conjecture App
熱門國家 | 系統支援 | 版本 | 費用 | APP評分 | 上架日期 | 更新日期 |
---|---|---|---|---|---|---|
未知 | Android Google Play | 1.2 App下載 | 免費 | 1970-01-01 | 2015-03-11 |