On numbers which are the sum of two squares
Euler does some examples determining whether certain numbers, like 100,981 and 1,000,009 are prime (yes and no, respectively). Primality testing seems to be his main application here.
Original Source Citation
Novi Commentarii academiae scientiarum Petropolitanae, Volume 4, pp. 3-40.
Opera Omnia Citation
Series 1, Volume 2, pp.295-327.