2009-01-20から1日間の記事一覧

Rubyで最長の数列を探す 〜Rubyでオイラープロジェクトを解こう!Problem14

Problem 14 - Project Eulerより The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) Using the rule above and starting with 13, we generate the following sequence: 13 40 20 …