A mathematical coincidence is said to occur when two expressions with no direct relationship show a near-equality which has no apparent theoretical explanation.
For example, there is a near-equality close to the round number 1000 between powers of 2 and powers of 10:
Some mathematical coincidences are used in engineering when one expression is taken as an approximation of another.
A mathematical coincidence often involves an integer, and the surprising feature is the fact that a real number arising in some context is considered by some standard as a "close" approximation to a small integer or to a multiple or power of ten, or more generally, to a rational number with a small denominator. Other kinds of mathematical coincidences, such as integers simultaneously satisfying multiple seemingly unrelated criteria or coincidences regarding units of measurement, may also be considered. In the class of those coincidences that are of a purely mathematical sort, some simply result from sometimes very deep mathematical facts, while others appear to come 'out of the blue'.
Given the countably infinite number of ways of forming mathematical expressions using a finite number of symbols, the number of symbols used and the precision of approximate equality might be the most obvious way to assess mathematical coincidences; but there is no standard, and the strong law of small numbers is the sort of thing one has to appeal to with no formal opposing mathematical guidance. Beyond this, some sense of mathematical aesthetics could be invoked to adjudicate the value of a mathematical coincidence, and there are in fact exceptional cases of true mathematical significance (see Ramanujan's constant below, which made it into print some years ago as a scientific April Fools' joke). All in all, though, they are generally to be considered for their curiosity value or, perhaps, to encourage new mathematical learners at an elementary level.
Sometimes simple rational approximations are exceptionally close to interesting irrational values. These are explainable in terms of large terms in the continued fraction representation of the irrational value, but further insight into why such improbably large terms occur is often not available.
Rational approximants (convergents of continued fractions) to ratios of logs of different numbers are often invoked as well, making coincidences between the powers of those numbers.
Many other coincidences are combinations of numbers that put them into the form that such rational approximants provide close relationships.
- The second convergent of π, [3; 7] = 22/7 = 3.1428..., was known to Archimedes, and is correct to about 0.04%. The fourth convergent of π, [3; 7, 15, 1] = 355/113 = 3.1415929..., found by Zu Chongzhi, is correct to six decimal places; this high accuracy comes about because π has an unusually large next term in its continued fraction representation: π = [3; 7, 15, 1, 292, ...].
- A coincidence involving π and the golden ratio φ is given by . This is related to Kepler triangles. Some believe one or the other of these coincidences is to be found in the Great Pyramid of Giza, but it is highly improbable that this was intentional.
- There is a sequence of six nines in pi that begins at the 762nd decimal place of the decimal representation of pi. For a randomly chosen normal number, the probability of any chosen number sequence of six digits (including 6 of a number, 658 020, or the like) occurring this early in the decimal representation is only 0.08%. Pi is conjectured, but not known, to be a normal number.
Concerning base 2
- The coincidence , correct to 2.4%, relates to the rational approximation , or to within 0.3%. This relationship is used in engineering, for example to approximate a factor of two in power as 3 dB (actual is 3.0103 dB – see Half-power point), or to relate a kibibyte to a kilobyte; see binary prefix.
- This coincidence can also be expressed as (eliminating common factor of , so also correct to 2.4%), which corresponds to the rational approximation , or (also to within 0.3%). This is invoked for instance in shutter speed settings on cameras, as approximations to powers of two (128, 256, 512) in the sequence of speeds 125, 250, 500, etc, and in the original Who Wants to Be a Millionaire? game show in the question values ...£16,000, £32,000, £64,000, £125,000, £250,000,...
Concerning musical intervals
- The coincidence , from leads to the observation commonly used in music to relate the tuning of 7 semitones of equal temperament to a perfect fifth of just intonation: , correct to about 0.1%. The just fifth is the basis of Pythagorean tuning and most known systems of music. From the consequent approximation it follows that the circle of fifths terminates seven octaves higher than the origin.
- The coincidence is the famous coincidence leading historically to the development of meantone temperament, in which the perfect fifths and the major thirds are "tempered" slightly so that four 's is approximately equal to , or a major third up two octaves. This coincidence can also be written , or , where is the famous syntonic comma, which is "tempered out" in this tuning.
- The coincidence leads to the rational version of 12-TET, as noted by Johann Kirnberger.
- The coincidence leads to the rational version of quarter-comma meantone temperament.
- The coincidence leads to the very tiny interval of (about a millicent wide), which is the first 7-limit interval tempered out in 103169-TET.[clarification needed]
- The coincidence of powers of 2, above, leads to the approximation that three major thirds concatenate to an octave, . This and similar approximations in music are called dieses.
Concerning powers of π
- correct to about 1.3%. This can be understood in terms of the formula for the zeta function  This coincidence was used in the design of slide rules, where the "folded" scales are folded on rather than because it is a more useful number and has the effect of folding the scales in about the same place.
- correct to 0.0004%.
- correct to 0.02%.
- or accurate to 8 decimal places (due to Ramanujan: Quarterly Journal of Mathematics, XLV, 1914, pp. 350–372). Ramanujan states that this "curious approximation" to was "obtained empirically" and has no connection with the theory developed in the remainder of the paper.
- Some plausible relations hold to a high degree of accuracy, but are nevertheless coincidental. One example is
- The two sides of this expression only differ after the 42nd decimal place.
Containing both π and e
- , within 0.000 005%
- , within 0.000 000 03% 
- , within 0.000 06% 
- , approximately 0.000 538% error (Joseph Clarke, 2015)
- , within 0.005% (Conway, Sloane, Plouffe, 1988); this is equivalent to 
- , within 0.002%
- . In fact, this generalizes to the approximate identity: which can be explained by the Jacobian theta functional identity.
- Ramanujan's constant: , within , discovered in 1859 by Charles Hermite. This very close approximation is not a typical sort of accidental mathematical coincidence, where no mathematical explanation is known or expected to exist (as is the case for most others here). It is a consequence of the fact that 163 is a Heegner number.
Other numerical curiosities
- and are the only non-trivial (i.e. at least square) consecutive powers of positive integers (Catalan's conjecture ).
- is the only positive integer solution of , assuming that  (see Lambert's W function for a formal solution method)
- The Fibonacci number F296182 is (probably) a semiprime, since F296182 = F148091 × L148091 where F148091 (30949 digits) and the Lucas number L148091 (30950 digits) are simultaneously probable primes.
- In a discussion of the birthday problem, the number occurs, which is "amusingly" equal to to 4 digits.
- Integers 1 through 10 divide the number that is at the same distance from them as the distance between their factorial and the next smallest square number. There is no rigorous reason for this to hold, and it holds true chaotically for number 11 and integers above it. 
- , making 3435 the only non-trivial Münchhausen number in base 10 (excluding 0 and 1). If one adopts the convention that , however, then 438579088 is another Münchhausen number.
- and are the only non-trivial factorions in base 10 (excluding 1 and 2).
- , , , and . If the end result of these four anomalous cancellations are multiplied, their product reduces to exactly 1/100.
- , , and . (Along a similar vein, .)
- , making 127 the smallest nice Friedman number. A similar example is .
- , , , and are all narcissistic numbers.
- , a prime number. The fraction 1/17 also produces 0.05882353 when rounded to 8 digits.
- . The largest number with this pattern is .
- (where is the golden ratio), and (where is Euler's totient function).
Numerical coincidences in numbers from the physical world
Speed of light
The speed of light is (by definition) exactly 299,792,458 m/s, extremely close to 300,000,000 m/s. This is a pure coincidence, as the meter was originally defined as 1/10,000,000 of the distance between the Earth's pole and equator along the surface at sea level, and the Earth's circumference just happens to be about 2/15 of a light-second. It is also roughly equal to one foot per nanosecond (the actual number is 0.9836 ft/ns).
The polar diameter of the Earth is equal to half a billion inches, to within 0.1%.
Angular diameters of the Sun and the Moon
As seen from Earth, the angular diameter of the Sun varies between 31′27″ and 32′32″, while that of the Moon is between 29′20″ and 34′6″. The fact that the intervals overlap (the former interval is contained in the latter) is a coincidence, and has implications for the types of solar eclipses that can be observed from Earth.
While not constant but varying depending on latitude and altitude, the numerical value of the acceleration caused by Earth's gravity on the surface lies between 9.74 and 9.87, which is quite close to 10. This means that as a result of Newton's second law, the weight of a kilogram of mass on Earth's surface corresponds roughly to 10 newtons of force exerted on an object.
This is related to the aforementioned coincidence that the square of pi is close to 10. One of the early definitions of the meter was the length of a pendulum whose half swing had a period equal to one second. Since the period of the full swing of a pendulum is approximated by the equation below, algebra shows that if this definition was maintained, gravitational acceleration measured in meters per second per second would be exactly equal to .
When it was discovered that the circumference of the earth was very close to 40,000,000 times this value, the meter was redefined to reflect this, as it was a more objective standard (because the gravitational acceleration varies over the surface of the Earth). This had the effect of increasing the length of the meter by less than 1%, which was within the experimental error of the time.
Another coincidence related to the gravitational acceleration g is that its value of approximately 9.8 m/s2 is equal to 1.03 light-year/year2, which numerical value is close to 1. This is related to the fact that g is close to 10 in SI units (m/s2), as mentioned above, combined with the fact that the number of seconds per year happens to be close to the numerical value of c/10, with c the speed of light in m/s. In fact, it has nothing to do with SI as c/g = 354 days, nearly, and 365/354 = 1.03.
US customary to metric conversions
As discovered by Randall Munroe, a cubic mile is close to cubic kilometers (within 0.5%). This means that a sphere with radius n kilometers has almost exactly the same volume as a cube with sides length n miles.
Although this coincidence is not as strong as some of the others in this section, it is notable that is a dimensionless physical constant, so this coincidence is not an artifact of the system of units being used.
The radius of geostationary orbit, 42,164 kilometres (26,199 mi) is within 0.02% of the variation of the distance of the moon in a month (the difference between its apogee and perigee), 42,171 kilometres (26,204 mi), and 5% error of the length of the equator, 40,075 kilometres (24,901 mi). Similarly, Earth's escape velocity is 40,270 km/h (25,020 mph).
- Almost integer
- Anthropic principle
- Birthday problem
- Exceptional isomorphism
- Narcissistic number
- Experimental mathematics
- Kepler triangle#A mathematical coincidence
- Koide formula
- Reprinted as Gardner, Martin (2001). "Six Sensational Discoveries". The Colossal Book of Mathematics. New York: W. W. Norton & Company. pp. 674–694. ISBN 978-0-393-02023-6. CS1 maint: discouraged parameter (link)
- Manfred Robert Schroeder (2008). Number theory in science and communication (2nd ed.). Springer. pp. 26–28. ISBN 978-3-540-85297-1.
- Petr Beckmann (1971). A History of Pi. Macmillan. pp. 101, 170. ISBN 978-0-312-38185-1.
- Yoshio Mikami (1913). Development of Mathematics in China and Japan. B. G. Teubner. p. 135.
- Eric W. Weisstein (2003). CRC concise encyclopedia of mathematics. CRC Press. p. 2232. ISBN 978-1-58488-347-0.
- Roger Herz-Fischler (2000). The Shape of the Great Pyramid. Wilfrid Laurier University Press. p. 67. ISBN 978-0-889-20324-2.
- Ottmar Beucher (2008). Matlab und Simulink. Pearson Education. p. 195. ISBN 978-3-8273-7340-3.
- K. Ayob (2008). Digital Filters in Hardware: A Practical Guide for Firmware Engineers. Trafford Publishing. p. 278. ISBN 978-1-4251-4246-9.
- Rubin, Frank. "The Contest Center – Pi".
- Elkies, Noam. "Why is so close to 10?" (PDF). Cite journal requires
|journal=(help)CS1 maint: discouraged parameter (link)
- Mathworld, Pi Approximations, Line 43
- Weisstein, Eric W. "Almost Integer". MathWorld.
- Bailey, David H.; Borwein, Jonathan M. (December 1, 2005). "Future Prospects for Computer-Assisted Mathematics" (PDF). Cite journal requires
- "Rogelio Tomas' web page".
- "Rogelio Tomas' web page".
- "Curious relation between and that produces almost integers". Math Stack Exchange. December 26, 2016. Retrieved 2017-12-04.
- Glaisher, J. W. L. "An Approximate Numerical Theorem Involving e and π". The Quarterly Journal of Pure and Applied Mathematics – via Göttinger Digitalisierungszentrum.
- "Proving the identity ". Stack Exchange. December 5, 2013. Retrieved 2017-12-04.
- Barrow, John D (2002). The Constants of Nature. London: Jonathan Cape. ISBN 978-0-224-06135-3.
- Harvey Heinz, Narcissistic Numbers.
- Ask Dr. Math, "Solving the Equation x^y = y^x".
- David Broadhurst, "Prime Curios!: 10660...49391 (61899-digits)".
- Arratia, Richard; Goldstein, Larry; Gordon, Louis (1990). "Poisson approximation and the Chen-Stein method". Statistical Science. 5 (4): 403–434. doi:10.1214/ss/1177012015. JSTOR 2245366. MR 1092983.
- Ivan Stoykov, .
- W., Weisstein, Eric. "Münchhausen Number". mathworld.wolfram.com. Retrieved 2017-12-04.
- (sequence A014080 in the OEIS)
- Weisstein, Eric W. "Anomalous Cancellation". MathWorld.
- (sequence A061209 in the OEIS)
- Prime Curios!: 343.
- Erich Friedman, Problem of the Month (August 2000).
- (sequence A005188 in the OEIS)
- (sequence A064942 in the OEIS)
- (sequence A032799 in the OEIS)
- Weisstein, Eric W. "Beast Number". MathWorld.
- Michon, Gérard P. "Numerical Coincidences in Man-Made Numbers". Mathematical Miracles. Retrieved 29 April 2011.
- Smythe, Charles (2004). Our Inheritance in the Great Pyramid. Kessinger Publishing. p. 39. ISBN 978-1-4179-7429-0.
- Cracking the AP Physics B & C Exam, 2004–2005 Edition. Princeton Review Publishing. 2003. p. 25. ISBN 978-0-375-76387-8.
- "What Does Pi Have To Do With Gravity?". Wired. March 8, 2013. Retrieved October 15, 2015.
- "Rydberg constant times c in Hz". Fundamental physical constants. NIST. Retrieved 25 July 2011.
- Randall Munroe (2014). What If?. p. 49. ISBN 9781848549562.
- "A Mole of Moles". what-if.xkcd.com. Retrieved 2018-09-12.
- "2322: ISO Paper Size Golden Spiral". explainxkcd.com. Retrieved 2020-09-12.
- Whittaker, Edmund (1945). "Eddington's Theory of the Constants of Nature". The Mathematical Gazette. 29 (286): 137–144. doi:10.2307/3609461. JSTOR 3609461.
- (in Russian) В. Левшин. – Магистр рассеянных наук. – Москва, Детская Литература 1970, 256 с.
- Hardy, G. H. – A Mathematician's Apology. – New York: Cambridge University Press, 1993, (ISBN 0-521-42706-1)
- Weisstein, Eric W. "Almost Integer". MathWorld.
- Various mathematical coincidences in the "Science & Math" section of futilitycloset.com
- Press, W. H., Seemingly Remarkable Mathematical Coincidences Are Easy to Generate