The 24/11/2012 edition of New Scientist had the following puzzle:
"I have in mind a list of consecutive positive integers. A second list of numbers is generated by squaring each of the numbers in my original list. The sum of the first 2500 of these squares is equal to the sum of the next 2499 in the list.
What is the smallest number in my original list?"
I've been learning Ruby so figured I'd write a script to solve it for me. The script uses something akin to the binary search algorithm to find the answer.
Turns out it is 12502500.