{"width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjeneshicc.hatenadiary.org%2Fentry%2F20081118%2F1227018237\" title=\"Problem 94 - \u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","blog_title":"\u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66","title":"Problem 94","categories":["Project Euler","Haskell"],"author_url":"https://blog.hatena.ne.jp/jeneshicc/","provider_name":"Hatena Blog","version":"1.0","published":"2008-11-18 23:23:57","url":"https://jeneshicc.hatenadiary.org/entry/20081118/1227018237","height":"190","image_url":null,"author_name":"jeneshicc","type":"rich","blog_url":"https://jeneshicc.hatenadiary.org/","description":"http://projecteuler.net/index.php?section=problems&id=94 \u307e\u305f\u3001pell equation. next (x,y) = (2*x+3*y,2*y+x) tolength x | (x+2) `mod` 3 == 0 = let a = (x+2) `div` 3 in 6*a-2 | (x-2) `mod` 3 == 0 = let a = (x-2) `div` 3 in 6*a+2 p094 = takeWhile(<10^9) . map (tolength.fst).tail.iterate next $ (2,1)"}