Problem 14
Longest Collatz Sequence
The following iterative sequence is defined for the set of positive integers:
Using the rule above and starting with
It can be seen that this sequence (starting at
Which starting number, under one million, produces the longest chain?
NOTE: Once the chain starts the terms are allowed to go above one million.
最长考拉兹序列
考虑如下定义在正整数集上的迭代规则:
从
可以看出这个序列(从
在小于一百万的数中,从哪个数开始迭代生成的序列最长?
注: 在迭代过程中允许出现超过一百万的项。
Gitalking ...