Project Euler 324

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


f(2)を出すのに30分かかった。今日はあきらめたほうがよさそう。
f(4)が26秒。やっぱ明日以降だな。