Problem 94
コンテンツ
http://projecteuler.net/index.php?section=problems&id=94
また、pell equation.
next (x,y) = (2*x+3*y,2*y+x) tolength x | (x+2) `mod` 3 == = let a = (x+2) `div` 3 in 6*a-2 | (x-2) `mod` 3 == = let a = (x-2) `div` 3 in 6*a+2 p094 = takeWhile(<10^9) . map (tolength.fst).tail.iterate next $ (2,1)
作成者 Toru Mano
最終更新時刻 2023-01-01 (c70d5a1)