Number theory is a branch of pure mathematics devoted primarily to the study of the integers and integer-valued functions. German mathematician Carl Friedrich Gauss said, “Mathematics is the queen of the sciences—and number theory is the queen of mathematics.”