forked from: Project Euler 279

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