Pythagoreanism to have survived as part of, or deeply influenced, the Bacchic cults and Orphism. Pythagoras was already in ancient times well known for the mathematical achievement of the Pythagorean theorem. Although the Babylonians had used this formula for centuries, Pythagoras had discovered that "in a right-angled triangle the square of the hypotenuse is equal to the squares of the other two sides". In ancient times Pythagoras was also noted for his discovery that music had mathematical foundations. Antique sources that credit Pythagoras as the philosopher who first discovered music intervals also credit him as the inventor of the monochord, a
Fermat's theorem on sums of two squares Fermat's theorem on sums of two squares In additive number theory, Fermat's theorem on sums of two squares states that an odd prime "p" can be expressed as: formula_1 with "x" and "y" integers, if and only if The prime numbers for which this is true are called Pythagorean primes. For example, the primes 5, 13, 17, 29, 37 and 41 are all congruent to 1 modulo 4, and they can be expressed as sums of two squares in the following ways: On the other hand, the primes 3, 7, 11, 19, 23 and 31 are all congruent to 3