Mathematics of Prime Numbers






Goldbach's conjecture is one of the oldest and best-known unsolved problems in number theory and in all of mathematics. It states:  Every even integer greater than 2 can be expressed as the sum of two primes. The conjecture has been shown to hold up through 4 × 1018 and is generally assumed to be true, but remains unproven despite considerable effort.

Prime Number Spiral See what Stanislaw Ulum discovered in 1963.  and and  and and

Some Prime Numbers:

   31,  331,  3331,  33331,  333331,  3333331, and  33333331  are primes.  But 333333331 = 17x19607843

   73,939,133 is also a prime number  If you keep removing a digit from the right hand end of the number, each of the remaining numbers is also prime. It's the largest number known with this property.

Twin Primes are prime numbers that have a prime gap of two, for example the twin prime pair (41, 43).  Twin primes appear despite the general tendency of gaps between adjacent primes to become larger as the numbers themselves get larger due to the prime number theorem (the "average gap" between primes less than n, is log(n)). The conjecture that there are an infinite number of twin primes has not been proven.

Primes of the form 6n + 1  Euler's theorem states that every prime of the form 6n + 1,  (i.e., 7, 13, 19, 31, 37, 43, 61, 67, ..., which are also the primes of the form 3m + 1, can be written in the form x^2+3y^2 with x and y positive integers.

Primes of the form 4n - 1 and 4n + 1  There are an infinite number.

A Pythagorean prime is a prime number of the form 4n + 1. They are the odd prime numbers p for which p is the length of the hypotenuse of a right triangle with integer sides, and they are also the prime numbers p for which p itself is the hypotenuse of a Pythagorean triangle

The first few Pythagorean primes are

5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, …

By Dirichlet's theorem on arithmetic progressions, this sequence is infinite. More strongly, for each n, the numbers of Pythagorean and non-Pythagorean primes up to n are approximately equal. However, the number of Pythagorean primes up to n is frequently somewhat smaller than the number of non-Pythagorean primes; this phenomenon is known as Chebyshev's bias.  For example, the only values of n up to 600000 for which there are more Pythagorean than non-Pythagorean odd primes are 26861 and 26862.

Pythagorean primes are exactly the odd prime numbers that are the sum of two squares. Fermat's theorem on sums of two squares states that the prime numbers that can be represented as sums of two squares are exactly 2 and the odd primes congruent to 1 mod 4.

Fortunate number 

Consider the Euclid numbers defined by


where p_k is the kth prime and p# is the primorial. The first few values of E_k are 3, 7, 31, 211, 2311, 30031, 510511, ... (OEIS A006862).

Now let q_k be the next prime (i.e., the smallest prime greater than E_k),


where pi(n) is the prime counting function. The first few values of q_k are 5, 11, 37, 223, 2333, 30047, 510529, ... (OEIS A035345).




R. F. Fortune (Margaret Mead's 2nd husband) conjectured that F_k=q_k-E_k+1 is prime for all k. The first values of F_k are 3, 5, 7, 13, 23, 17, 19, 23, ... (OEIS A005235), and values of F_k up to k=100 are indeed prime(Guy 1994), a result extended to 1000 by E. W. Weisstein (Nov. 17, 2003). The indices of these primes are 2, 3, 4, 6, 9, 7, 8, 9, 12, 18, .... In numerical order with duplicates removed, the Fortunate primes are 3, 5, 7, 13, 17, 19, 23, 37, 47, 59, 61, 67, 71, 79, 89, ... (OEIS A046066).  A Fortunate prime is a Fortunate number which is also a prime number. As of 2012, all the known Fortunate numbers are prime.


A Fortunate number, named after Reo Fortune, for a given positive integer n is the smallest integer m > 1 such that pn# + m is a prime number, where the primorial pn# is the product of the first n prime numbers.

For example, to find the seventh Fortunate number, one would first calculate the product of the first seven primes (2, 3, 5, 7, 11, 13 and 17), which is 510510. Adding 2 to that gives another even number, while adding 3 would give another multiple of 3. One would similarly rule out the integers up to 18. Adding 19, however, gives 510529, which is prime. Hence 19 is a Fortunate number. The Fortunate number for pn# is always above pn. This is because pn#, and thus pn# + m, is divisible by the prime factors of m for m = 2 to pn.

The Fortunate numbers for the first primorials are:

3, 5, 7, 13, 23, 17, 19, 23, 37, 61, 67, 61, 71, 47, 107, 59, 61, 109, etc. (sequence A005235 in OEIS).

The Fortunate numbers sorted in numerical order with duplicates removed:

3, 5, 7, 13, 17, 19, 23, 37, 47, 59, 61, 67, 71, 79, 89, 101, 103, 107, 109, 127, 151, 157, 163, 167, 191, 197, 199, ... ((sequence A046066 in OEIS)).

Reo Fortune conjectured that no Fortunate number is composite (Fortune's conjecture). 

Formulas for prime numbers

It is known that no non-constant polynomial function P(n) with integer coefficients exists that evaluates to a prime number for all integers n. The proof is as follows: Suppose such a polynomial existed. Then P(1) would evaluate to a prime p, so P(1) \equiv 0 \pmod p. But for any k, P(1+kp) \equiv 0 \pmod p also, so P(1+kp) cannot also be prime (as it would be divisible by p) unless it were p itself, but the only way P(1+kp) = P(1) for all k is if the polynomial function is constant.

The same reasoning shows an even stronger result: no non-constant polynomial function P(n) exists that evaluates to a prime number for almost all integers n.

Euler first noticed (in 1772) that the quadratic polynomial

P(n) = n2n + 41

is prime for all positive integers less than 41. The primes for n = 1, 2, 3... are 41, 43, 47, 53, 61, 71... The differences between the terms are 2, 4, 6, 8, 10... For n = 41, it produces a square number, 1681, which is equal to 41×41, the smallest composite number for this formula. If 41 divides n, it divides P(n) too. The phenomenon is related to the Ulam spiral, which is also implicitly quadratic, and the class number; this polynomial is related to the Heegner number 163=4\cdot 41-1, and there are analogous polynomials for p=2, 3, 5, 11, \text{ and } 17, corresponding to other Heegner numbers.

It is known, based on Dirichlet's theorem on arithmetic progressions, that linear polynomial functions L(n) = an + b produce infinitely many primes as long as a and b are relatively prime (though no such function will assume prime values for all values of n). Moreover, the Green–Tao theorem says that for any k there exists a pair of a and b with the property that L(n) = an+b is prime for any n from 0 to k − 1. However, the best known result of such type is for k = 26:

43142746595714191 + 5283234035979900n is prime for all n from 0 to 25

Prime Number Theorem Let π(x) be the prime-counting function that gives the number of primes less than or equal to x, for any real number x. For example, π(10) = 4 because there are four prime numbers (2, 3, 5 and 7) less than or equal to 10. The prime number theorem then states that x / ln(x) is a good approximation to π(x), in the sense that the limit of the quotient of the two functions π(x) and x / ln(x) as x approaches infinity is 1:


known as the asymptotic law of distribution of prime numbers. Using asymptotic notation this result can be restated as

\pi(x)\sim\frac{x}{\ln x}.\!

This notation (and the theorem) does not say anything about the limit of the difference of the two functions as x approaches infinity. Instead, the theorem states that x/ln(x) approximates π(x) in the sense that the relative error of this approximation approaches 0 as x approaches infinity.

The prime number theorem is equivalent to the statement that the nth prime number pn is approximately equal to n ln(n), again with the relative error of this approximation approaching 0 as n approaches infinity.

Carl Friedrich Gauss considered the same question: "Im Jahr 1792 oder 1793", according to his own recollection nearly sixty years later in a letter to Encke (1849), he wrote in his logarithm table (he was then 15 or 16) the short note "Primzahlen unter a(=\infty) \frac a{\ln a}". But Gauss never published this conjecture.

In 1838 Peter Gustav Lejeune Dirichlet came up with his own approximating function, the logarithmic integral li(x) (under the slightly different form of a series, which he communicated to Gauss). Both Legendre's and Dirichlet's formulas imply the same conjectured asymptotic equivalence of π(x) and x / ln(x) stated above, although it turned out that Dirichlet's approximation is considerably better if one considers the differences instead of quotients.

In two papers from 1848 and 1850, the Russian mathematician Pafnuty L'vovich Chebyshev attempted to prove the asymptotic law of distribution of prime numbers. His work is notable for the use of the zeta function ζ(s) (for real values of the argument "s", as are works of Leonhard Euler, as early as 1737) predating Riemann's celebrated memoir of 1859, and he succeeded in proving a slightly weaker form of the asymptotic law, namely, that if the limit of π(x)/(x/ln(x)) as x goes to infinity exists at all, then it is necessarily equal to one.He was able to prove unconditionally that this ratio is bounded above and below by two explicitly given constants near to 1 for all x. Although Chebyshev's paper did not prove the Prime Number Theorem, his estimates for π(x) were strong enough for him to prove Bertrand's postulate that there exists a prime number between n and 2n for any integer n ≥ 2.An important paper concerning the distribution of prime numbers was Riemann's 1859 memoir On the Number of Primes Less Than a Given Magnitude, the only paper he ever wrote on the subject. Riemann introduced new ideas into the subject, the chief of them being that the distribution of prime numbers is intimately connected with the zeros of the analytically extended Riemann zeta function of a complex variable. In particular, it is in this paper of Riemann that the idea to apply methods of complex analysis to the study of the real function π(x) originates. Extending the ideas of Riemann, two proofs of the asymptotic law of the distribution of prime numbers were obtained independently by Jacques Hadamard and Charles Jean de la Vallée-Poussin and appeared in the same year (1896). Both proofs used methods from complex analysis, establishing as a main step of the proof that the Riemann zeta function ζ(s) is non-zero for all complex values of the variable s that have the form s = 1 + it with t > 0.

The Riemann zeta function or Euler–Riemann zeta function ζ(s) is a function of a complex variable s = σ + it. (The notation with s, σ, and t is traditionally used in the study of the ζ-function, following Riemann.)

The following infinite series converges for all complex numbers s with real part greater than 1, and defines ζ(s) in this case:

\zeta(s) =
\sum_{n=1}^\infty n^{-s} =
\frac{1}{1^s} + \frac{1}{2^s} + \frac{1}{3^s} + \cdots \;\;\;\;\;\;\; \sigma = \mathfrak{R}(s) > 1.

 This function, as a function of a real argument, was introduced and studied by Leonhard Euler in the first half of the eighteenth century without using complex analysis, which was not available at that time. Bernhard Riemann in his article "On the Number of Primes Less Than a Given Magnitude" published in 1859 extended the Euler definition to a complex variable, proved its meromorphic continuation and functional equation and established a relation between its zeros and the distribution of prime numbers.

Leonhard Euler considered the above series in 1740 for positive integer values of s, and later Chebyshev extended the definition to real s > 1.

The above series is a prototypical Dirichlet series that converges absolutely to an analytic function for s such that σ > 1 and diverges for all other values of s. Riemann showed that the function defined by the series on the half-plane of convergence can be continued analytically to all complex values s ≠ 1. For s = 1 the series is the harmonic series which diverges to +∞, and

 \lim_{s\to 1}(s-1)\zeta(s)=1.

Thus the Riemann zeta function is a meromorphic function on the whole complex s-plane, which is holomorphic everywhere except for a simple pole at s = 1 with residue 1.  (A holomorphic function is a complex-valued function of one or more complex variables that is complex differentiable in a neighborhood of every point in its domain.) (A meromorphic function is a ratio of two well-behaved (holomorphic) functions.)

The values of the Riemann zeta function at even positive integers were computed by Euler. The first of them, ζ(2), provides a solution to the Basel problem.   In 1979 Apéry proved the irrationality of ζ(3). The values at negative integer points, also found by Euler, are rational numbers.

Riemann zeta function ζ(s) in the complex plane. The color of a point s encodes the value of ζ(s): colors close to black denote values close to zero, while hue encodes the value's argument.

The white spot at s = 1 is the pole of the zeta function; the black spots on the negative real axis and on the critical line Re(s) = 1/2 are its zeros. Values with arguments close to zero including positive reals on the real half-line are presented in red.

This image shows a plot of the Riemann zeta function along the critical line for real values of t running from 0 to 34. The first five zeros in the critical strip are clearly visible as the place where the spirals pass through the origin.

he general harmonic series is of the form

\sum_{n=0}^{\infty}\frac{1}{an+b} ,\!

where a \ne 0 and b are real numbers. The general harmonic series diverge.

The sum of harmonic progression is mathematically related to derivative of gamma function

   1 \,+\, \frac{1}{2} \,+\, \frac{1}{3} \,+\, \frac{1}{4} \,+\, \frac{1}{5} \,+\, \cdots\, \frac{1}{n}   =  \left(\frac{{\rm d}}{{\rm d}x}\,\ln(\Gamma(x+1))\right)_{x=n} +\, \gamma.

Here 'x' is the number of terms up to which sum is taken.  \gamma is Euler–Mascheroni constant: 0.57721566...

Another slowly divergent series is the sum of the reciprocals of all prime numbers:
\sum_{p\text{ prime }}\frac1p = \frac12 + \frac13 + \frac15 + \frac17 + \frac1{11} + \frac1{13} + \frac1{17} + \cdots = \infty

This was proved by Leonhard Euler in 1737, and strengthens Euclid's 3rd-century-BC result that there are infinitely many prime numbers.

There are a variety of proofs of Euler's result, including a lower bound for the partial sums stating that

\sum_{\scriptstyle p\text{ prime }\atop \scriptstyle p\le n}\frac1p \ge \log \log (n+1) - \log\frac{\pi^2}6

for all natural numbers n. The double natural logarithm indicates that the divergence might be very slow, which is indeed the case, see Meissel–Mertens constant. The partial sum for the primes less than 1 million is only 2.887289... .

The Meissel–Mertens constant (named after Ernst Meissel and Franz Mertens) defined as the limiting difference between the harmonic series summed only over the primes and the natural logarithm of the natural logarithm:

M = \lim_{n \rightarrow \infty } \left(
\sum_{p \leq n} \frac{1}{p}  - \ln(\ln(n)) \right)=\gamma + \sum_{p} \left[ \ln\! \left( 1 - \frac{1}{p} \right) + \frac{1}{p} \right].

The symbol γ is the famous Euler–Mascheroni constant, which has a similar definition involving a sum over all integers (not just the primes).  The value of M is approximately  0.2614972128.... .

Trivia: The number M was used by Google when bidding in the Nortel patent auction. Google posted three bids based on mathematical numbers: $1,902,160,540 (Brun's constant), $2,614,972,128 (Meissel–Mertens constant), and $3.14159 billion ( π ). Google  famously bid pi billion dollars and other multiples of mathematical constants, showing a strange sense of humor with shareholders' money.


The (complete) gamma function Gamma(n) is defined to be an extension of the factorial to complex and real number arguments. It is related to the factorial by  Gamma(n)=(n-1)!, a slightly unfortunate notation due to Legendre which is now universally used instead of Gauss's simpler Pi(n)=n!  There are no points z at which Gamma(z)=0.

The gamma function can be defined as a definite integral for R[z]>0(Euler's integral form) as

  Gamma(z)=int_0^1[ln(1/t)]^(z-1)dt. or int_0^inftyt^(z-1)e^(-t)dtor 2int_0^inftye^(-t^2)t^(2z-1)dt,

The complete gamma function Gamma(x) can be generalized to the upper incomplete gamma function Gamma(a,x)and lower incomplete gamma function gamma(a,x).


Plots of the real and imaginary parts of Gamma(z)in the complex plane are illustrated above.

Below we see the gamma function along part of the real axis: 


Integrating   Gamma(z)2int_0^inftye^(-t^2)t^(2z-1)dt, by parts for a real argument, it can be seen that Gamma(x)(x-1)Gamma(x-1).

If  x is an integer  Gamma(n) = (n-1)!, so the gamma function reduces to the factorial for a positive integer argument.

A beautiful relationship between Gamma(z)and the Riemann zeta function zeta(z)is given by:

 zeta(z)Gamma(z)=int_0^infty(u^(z-1))/(e^u-1)du   for R[z]>1

The gamma function can also be defined by an infinite product form:

 Gamma(z)=[ze^(gammaz)product_(r=1)^infty(1+z/r)e^(-z/r)]^(-1),  where gammais the Euler-Mascheroni constant

The Euler limit form is  Gamma(z)=1/zproduct_(n=1)^infty[(1+1/n)^z(1+z/n)^(-1)], so, Gamma(z) = lim_(n->infty)(n!)/((z)_(n+1))n^z

The reciprocal of  the gamma function 1/Gamma(z) is an entire function  expressed as


where gammais the Euler-Mascheroni constant and zeta(z)is the Riemann zeta function 






Home | Mathematics and  Beauty | Mathematics of Prime Numbers | Mathematicians | Mathematical Topics | Math Humor | Mathematics and Music | Mathematics Odds and Ends | Mathematics Series | Mathematics Interesting Mumbers



This site was last updated 11/24/16