Problem 141 of Project Euler proved to be just as difficult as the number of people who has actually solved it shows. The problem reads

**A positive integer, ***n*, is divided by *d* and the quotient and remainder are *q* and *r* respectively. In addition *d*, *q*, and *r* are consecutive positive integer terms in a geometric sequence, but not necessarily in that order.

**For example, 58 divided by 6 has quotient 9 and remainder 4. It can also be seen that 4, 6, 9 are consecutive terms in a geometric sequence (common ratio 3/2).**

**We will call such numbers, ***n*, progressive.

**Some progressive numbers, such as 9 and 10404 = 102**^{2}, happen to also be perfect squares.

**The sum of all progressive perfect squares below one hundred thousand is 124657.**

**Find the sum of all progressive perfect squares below one trillion (10**^{12}).

I ended up getting the right idea when I was working out. I guess some times it really does help to do something else. In this problem it comes down to some really basic properties and insights so lets start with those Continue reading →