After qualifying as a teacher of mathematics and physics Vályi was awarded a scholarship to allow him to study for two years at the University of Berlin, where the remarkable mathematics team of Kummer, Borchardt, Weierstrass and Kronecker were lecturing.
Before the 20th century, definitions of primality were inconsistent, and significant mathematicians such as Goldbach, Lambert, Legendre, Cayley, and Kronecker wrote that 1 was prime.