Quote:
Originally Posted by EdH
In my dowhile loop, I'm simply advancing the lower series by square differences and once the value has surpassed the high square, I advance the high square to the next square. The difference swings above and below 0, until at some point it equals 0

You don't need the lower series  you just need to advance the high series until the difference is _some_ square, and checking whether a number is a square isn't too difficult. If a number is a possiblesquaremodp for lots of p, it's pretty likely to be square, and each p rules out about half the numbers ... you can keep track of the values of the high series modulo lots of p quite efficiently since you're only doing addition.