According to <a href="http://www.math.rug.nl/~top/Chandrasekar.pdf">this mathematically historical paper</a> the origin of this observation goes to Fermat and his method of infinite descent, though Mordell (as noted by Weil) was the first to make it explicit in this particular form.