Professor Cardy

Prime Number Calculator

PORTUGUESE ENGLISH SPANISH FRENCH GERMAN CHINESE

Enter an integer (max. 1,000,000)


21157 is a prime number.

About the Calculator

This calculator performs the decomposition of a number into its prime factors and lists all its natural divisors. Enter an integer between 1 and 1,000,000.

Curiosities

1) Relation to multiples of 6: Every prime number greater than 3 is always one less or one more than a multiple of 6.
Example: `21157` is 1 more than `21156` (multiple of 6).

2) Square minus 1 divisible by 24: For every prime number greater than 3, if 1 is subtracted from its square, the result is always divisible by 24.
Example: The square of `21157` is `447618649`. Subtracting 1, we get `447618648`. Note that `447618648 ÷ 24 = 18650777`.

3) Difference of squares: Every prime number greater than 2 can be expressed as the difference of the squares of two consecutive natural numbers.
Example: `21157 = 10579^2 - 10578^2 = 111915241 - 111894084`

4) Sum of two squares: Every prime number of the form `4n+1` (where n is a positive natural number) can be expressed as the sum of two squares.
Example: `21157 = 94^2 + 111^2 = 8836 + 12321`, where `21157 = 4 × 5289 + 1`.

5) Form `4n+1` or `4n-1`: Except for the number 2, all prime numbers follow the pattern `4n+1` or `4n-1`, where `n` is a natural number.
Example: `21157` is of the form `4n+1`, where `n = 5289`.

The First 10,000 Prime Numbers