|A pentagram colored to distinguish its line segments of different lengths. The four lengths are in golden ratio to one another|
Image credit: User:PAR
In mathematics and the arts, two quantities are in the golden ratio if the ratio between the sum of those quantities and the larger one is the same as the ratio between the larger one and the smaller. The golden ratio is a mathematical constant, usually denoted by the Greek letter φ (phi).
Expressed algebraically, two quantities a and b (assuming ) are therefore in the golden ratio if
It follows from this property that φ satisfies the quadratic equation φ2 = φ + 1 and is therefore an algebraic irrational number, given by
which is approximately equal to 1.6180339887.
At least since the Renaissance, many artists and architects have proportioned their works to approximate the golden ratio—especially in the form of the golden rectangle, in which the ratio of the longer side to the shorter is the golden ratio—believing this proportion to be aesthetically pleasing. Mathematicians have studied the golden ratio because of its unique and interesting properties.
Other names frequently used for or closely related to the golden ratio are golden section (Latin: sectio aurea), golden mean, golden number, divine proportion (Italian: proporzionedivina), divine section (Latin: sectio divina), golden proportion, golden cut, and mean of Phidias.
The sieve of Eratosthenes is a simple algorithm for finding all prime numbers up to a specified maximum value. It works by identifying the prime numbers in increasing order while removing from consideration composite numbers that are multiples of each prime. This animation shows the process of finding all primes no greater than 120. The algorithm begins by identifying 2 as the first prime number and then crossing out every multiple of 2 up to 120. The next available number, 3, is the next prime number, so then every multiple of 3 is crossed out. (In this version of the algorithm, 6 is not crossed out again since it was just identified as a multiple of 2. The same optimization is used for all subsequent steps of the process: given a prime p, only multiples no less than p2 are considered for crossing out, since any lower multiples must already have been identified as multiples of smaller primes. Larger multiples that just happen to already be crossed out—like 12 when considering multiples of 3—are crossed out again, because checking for such duplicates would impose an unnecessary speed penalty on any real-world implementation of the algorithm.) The next remaining number, 5, is the next prime, so its multiples get crossed out (starting with 25); and so on. The process continues until no more composite numbers could possibly be left in the list (i.e., when the square of the next prime exceeds the specified maximum). The remaining numbers (here starting with 11) are all prime. Note that this procedure is easily extended to find primes in any given arithmetic progression. One of several prime number sieves, this ancient algorithm was attributed to the Greek mathematician Eratosthenes (d. c. 194 BCE) by Nicomachus in his first-century (CE) work Introduction to Arithmetic. Other more modern sieves include the sieve of Sundaram (1934) and the sieve of Atkin (2003). The main benefit of sieve methods is the avoidance of costly primality tests (or, conversely, divisibility tests). Their main drawback is their restriction to specific ranges of numbers, which makes this type of method inappropriate for applications requiring very large prime numbers, such as public-key cryptography.