Project Euler 465(1)

http://projecteuler.net/index.php?section=problems&id=465

今朝P(1)を数えて、131を確認して、そのあとP(2)に取り掛かったら気づいた。
コードを書いてみたら、P(50)が限界だった。