{"version":"1.0","author_url":"https://blog.hatena.ne.jp/jeneshicc/","provider_url":"https://hatena.blog","type":"rich","categories":["Project Euler","Haskell"],"blog_title":"\u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66","width":"100%","title":"Problem 182","url":"https://jeneshicc.hatenadiary.org/entry/20090121/1232536913","image_url":null,"blog_url":"https://jeneshicc.hatenadiary.org/","provider_name":"Hatena Blog","description":"http://projecteuler.net/index.php?section=problems&id=182 p182 p q = sum [e | e <-[2..phi-1], gcd e phi == 1, gcd (e-1) (p-1) == 2, gcd (e-1) (q-1) == 2] where phi = (p-1)*(q-1) main = print $ p182 1009 3643 {-- g(e,p) = x^e=x (mod p) \u306e\u89e3\u306e\u6570 = gcd(e-1,p-1)+1 a : prime of Zp (Zp\u306e\u751f\u6210\u5143) ,0 <= y < p (a^y)^\u2026","published":"2009-01-21 20:21:53","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjeneshicc.hatenadiary.org%2Fentry%2F20090121%2F1232536913\" title=\"Problem 182 - \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>","author_name":"jeneshicc","height":"190"}