A **prime number** (or a **prime**) is a natural number greater than 1 that has **no positive divisors other than 1 and itself.**

A natural number greater than 1 that is not a prime number is called a **composite number.** For example, 5 is prime because 1 and 5 are its only positive integer factors, whereas 6 is composite because it has the divisors 2 and 3 in addition to 1 and 6. The fundamental theorem of arithmetic establishes the central role of primes in number theory: any integer greater than 1 can be expressed as a product of primes that is unique up to ordering. The uniqueness in this theorem requires excluding 1 as a prime because one can include arbitrarily many instances of 1 in any factorization, e.g., 3, 1 · 3, 1 · 1 · 3, etc. are all valid factorizations of 3.

**There are infinitely many primes, as demonstrated by Euclid around 300 BC.** As of January 2016, the largest known prime number has 22,338,618 decimal digits.

**There is no known simple formula that separates prime numbers from composite numbers.** However, the distribution of primes, that is to say, the statistical behaviour of primes in the large, can be modelled. The first result in that direction is the prime number theorem, proven at the end of the 19th century, which says that the probability that a given, randomly chosen number *n* is prime is inversely proportional to its number of digits, or to the logarithm of *n*.

For a long time, number theory in general, and the study of prime numbers in particular, was seen as the **canonical example of pure mathematics**, with **no applications** outside of the self-interest of studying the topic with the exception of use of prime numbered gear teeth to distribute wear evenly. In particular, number theorists such as British mathematician G. H. Hardy prided themselves on doing work that had absolutely no military significance.

However, this vision was shattered in the 1970s, when **it was publicly announced that prime numbers could be used as the basis for the creation of public key cryptography algorithms.** Prime numbers are also used for hash tables and pseudorandom number generators.

Some rotor machines were designed with a different number of pins on each rotor, with the number of pins on any one rotor either prime, or coprime to the number of pins on any other rotor. This helped generate the full cycle of possible rotor positions before repeating any position.

**The first 168 prime numbers (all the prime numbers less than 1000) are:**

- 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997

**There is no known efficient formula for primes.**

## Ulam’s Spiral

Unexpected patterns of diagonal lines are apparent in such a plot, as illustrated in the above grid. This construction was first made by Polish-American mathematician Stanislaw Ulam (1909-1986) in 1963 while doodling during a boring talk at a scientific meeting. While drawing a grid of lines, he decided to number the intersections according to a spiral pattern, and then began circling the numbers in the spiral that were primes. Surprisingly, the circled primes appeared to fall along a number of diagonal straight lines or, in Ulam’s slightly more formal prose, it “appears to exhibit a strongly nonrandom appearance” (Stein *et al. *1964). The spiral appeared on the March 1964 cover of *Scientific American* magazine.

*Ulam constructed the spiral by writing down a regular rectangular grid of numbers, starting with 1 at the center, and spiraling out.*

*He then circled all of the prime numbers and he got the picture above.*

*The plot above shows a larger part of the spiral in which the primes are shown as dots.*

Remarkably, noted science fiction author Arthur C. Clarke described the prime spiral in his novel *The City and the Stars* (1956, Ch. 6, p. 54). Clarke wrote, “Jeserac sat motionless within a whirlpool of numbers. The first thousand primes… Jeserac was no mathematician, though sometimes he liked to believe he was. All he could do was to search among the infinite array of primes for special relationships and rules which more talented men might incorporate in general laws. He could find how numbers behaved, but he could not explain why. It was his pleasure to hack his way through the arithmetical jungle, and sometimes he discovered wonders that more skillful explorers had missed. He set up the matrix of all possible integers, and started his computer stringing the primes across its surface as beads might be arranged at the intersections of a mesh.”

*A hexagonal prime spiral can also be constructed, as illustrated above (Abbott 2005).*

## Sokolowski’s Spiral

Aleksander Sokolowski ( 2017) discovered that prime numbers appear on only 4 of 12 lines drawn from the center of a spiral (or set of concentric circles):

*Blue dots mark the prime numbers (red are exceptions).
*

*Copyright 2017 by A. Sokolowski*

*There are no prime numbers on lines 2, 3, 4, 6, 8, 9, 10, 12.
Prime numbers are marked as blue dots (exceptions are in magenta).
Copyright 2017 by A. Sokolowski*

Michael Vlasoff says

It’s not formally proven discovery:

Applying formula (a[i] + 1)^n – a[i]^n (where a[i] is any positive integer, and n > 2 is prime number) we can build the sequence of numbers. It’s obvious that some of them will be prime numbers, and others have dividers as members of simple progression with step 2n.

n = 3 -> {7,13,19,25,31,37,43,49,55,61,67,73,…}

n = 5 -> {11,21,31,41,51,61,71,81,91,…}

n = 7 -> {15,29,43,57,71,85,…}

n = 11 -> {23,45,67,89,…}

Programmatically (JavaScript code) this discovery was proved for large range of numbers. You can check numbers 11389957, 11448487 and 11613169 – just few discovered.

Example for n = 3:

a[i] 1 2 3 4 5 6 7 8 9

a[i]^3 1 8 27 64 125 216 343 512 729

(a[i] + 1)^3 – a[i]^3 7 19 37 61 91 127 169 217

Numbers 91, 169, and 217 are not prime numbers, and they have dividers 7, 13.

How to find the prime number bigger than recently found M74207281?

For n = 3 the formula (a[i] + 1)^n – a[i]^n can be presented as 3a[i]^2 + 3a[i] + 1

Let’s name M74207281 as M, as use this number as start point to calculate the sequence of numbers P using formula:

3M[i]^2 + 3M[i] + 1 = P[i]

Each calculated number P[i] we have to test for primary by dividing it by members of simple progression for n = 3 till current divider <= P[i]

Alex says

Enter a number and the Prime Number Calculator will instantly tell you if it is a prime number or not.

http://www.math.com/students/calculators/source/prime-number.htm

oneno says

An independent scientist has determined how to rapidly generate PRIME numbers by simple addition and subtraction in an iterative process that excludes any false primes as described in his book released March 2007 called “Calculate Primes”.