Project Euler 149

@see http://projecteuler.net/index.php?section=problems&id=149