We provide an algorithm to generate minimal solutions to Eulerâs six-squares problem. The method makes use of the theta series of the square lattice, the two-dimensional integer lattice. We also consider applications to generalizations of Eulerâs problem. This talk should be easily accessible to undergraduates.