On this day in 1749, Euler wrote to Goldbach that he had succeeded in proving Fermat's theorem on sums of two squares. Fermat had stated in 1640 that an odd prime number *p* can be expressed as $p = x^2 + y^2$ for integers *x, y* if and only if *p* is congruent to 1 (mod 4), but had given no proof.