* solution to problem 551 from project euler * renamed variables, and added more comments to improve readabilty