Let p be a prime. Then, p leaves a remainder 1 when divided by 4 if and only if p is a sum of squares of two integers. This is a well-known result of Fermat. We will leave this thread here; if followed it would lead us into Reciprocity Laws - a theme that is at the heart of modern number theory.
More generally, given a Binary quadratic form, say Q(x, y) := ax2 +bxy +cy2, one may ask if one can “succinctly” describe the integers n that can be represented by Q, i.e. there exists integers x0 and y0 such that Q(x0, y0) = n. This naturally leads us to the notion of composition of two binary quadratic forms to give us a third binary quadratic form. Possibility of such composition laws was first studied by Lagrange and then made more precise by Legendre. The job was completed by Gauss. We will briefly describe this work of Gauss on the Composition of Binary Quadratic Forms, as simplified by Dirichlet (This is 1850s) - which turns the set of Binary Quadratic Forms of a given Discriminant (up to proper equivalence) into a finite Abelian group. In his Princeton thesis (2004), Manjul Bhargava provided another very natural definition of this composition law of Gauss. We will end by stating this beautiful theorem of Bhargava.