# Surprising identities / equations

What are some surprising equations/identities that you have seen, which you would not have expected?

This could be complex numbers, trigonometric identities, combinatorial results, algebraic results, etc.

I'd request to avoid 'standard' / well-known results like $$e^{i \pi} + 1 = 0$$.

Please write a single identity (or group of identities) in each answer.

I found this list of Funny identities, in which there is some overlap.

• I really can't believe no one has posted this yet: xkcd.com/687 – Mike G Sep 26 '13 at 14:48
• This is not in line with what you are looking for, but as a child I discovered that 10million pi is the number of seconds in a year to 1/2% accuracy. This is useful for quick back of envelope calculations, where seconds are involved. – JTP - Apologise to Monica Sep 26 '13 at 19:48
• Pi seconds is a nanocentury! – Oscar Cunningham Oct 1 '13 at 21:59
• The three trigonometric identities in the following exercises of my Wikibook: en.wikibooks.org/wiki/On_2D_Inverse_Problems/… – DVD Oct 12 '15 at 2:51
• This shouldn't be closed. There are still so many nice equations.In spherical trigonometry $$\frac{sin(A)}{sin(a)}=\frac{sin(B)}{sin(b)}=\frac{sin(B)}{sin(b)}$$ where the capital letters are the angles and lowercase are the opposite sides. – skan Nov 26 '16 at 17:12

$$2^{67}-1 = 193,707,721 × 761,838,257,287$$ This identity was found by Cole in the early 20th century. He later said that the result had taken him "three years of Sundays" to find.

There's also the fact that:
$2^{127} -1$ is indeed prime, as Mersenne claimed. This was the largest known prime number for 75 years, and the largest ever calculated by hand. Édouard Lucas proved its primality in 1876.

The infinite Fibonacci sequence $F = (0, 1, 1, 2, 3, 5, 8, \dots)$ and the infinite Fibonacci string $S = 1011010110110 \dots$ are related by the following remarkable identity for all real or complex $\beta$ such that $\ |\beta| > 1$:

$$[0 \ ; \ \beta^{F_0}, \beta^{F_1}, \beta^{F_2}, \dots] = (\beta - 1) \cdot (0.S)_\beta$$

where $[0 \ ; \ \beta^{F_0}, \beta^{F_1}, \beta^{F_2}, \dots]$ denotes the continued fraction

$$\frac{1}{\beta^{F_0} + \frac{1}{\beta^{F_1} + \frac{1}{\beta^{F_2} + \cdots}}}$$

and $(0.S)_\beta = (0.1011010110110 \dots)_\beta$ denotes the number obtained by reading $0.S$ as a "base-$\beta$ numeral"; that is, $(0.S)_\beta$ denotes the sum of the infinite series

$$S[1] \beta^{-1} + S[2]\beta^{-2} + S[3]\beta^{-3} + \cdots$$

where $S[n]$ is the $n$th element of string $S$.

E.g., the so-called rabbit constant $(0.S)_2$ = 0.709803... in decimal , $(0.S)_\pi$ = 0.362011... in decimal, etc.

($F$ and $S$ are also related by the fact that both are generated by recursions of the form $x_{n+1} = x_{n} + x_{n-1} ;\ x_0 = 0, \ x_1 = 1$, where the $+$ is interpreted in one case as arithmetic addition, and in the other case as string concatenation.)

$y(x)=\left \{ \frac{x- \frac {\left \lceil \frac {\sqrt {1+8x}-1} {2} \right \rceil \left ( 1-\left \lceil \frac {\sqrt {1+8x}-1} {2} \right \rceil \mod2 \right)} {2}} {\left \lceil \frac {\sqrt {1+8x}-1} {2} \right \rceil}\right \}$

This function has the following slopes: 1 at [0,1), 2 at [1,3) and so on

• can you tell me, where you have find this? – GA316 Nov 19 '13 at 10:27

I know it's incredibly simple, but I'm always awed by $$2+2 = 2 \cdot 2 = 2^2 = \;^2 2.$$ Two is where addition, multiplication and exponentiation meet. And: tetration.

• That extends beyond exponentiation, as well, in the sense that 2 op 2 has the same value for every binary operation op in Goodstein's infinite sequence of hyperoperations (+, *, ↑, ↑↑, ↑↑↑, ...). – r.e.s. Sep 27 '13 at 4:23
• @r.e.s. Can you explain that? Isn't 2 ↑↑ 2 = 16 ? – MrZander Sep 28 '13 at 0:04
• @MrZander For any op beyond addition, in the expression x op y the y specifies how many x's are to be "combined" using the hyperoperator at the next lower level. E.g., 2↑↑4 = 2↑2↑2↑2 = 2↑2↑4 = 2↑16 = 65536, 2↑↑3 = 2↑2↑2 = 2↑4 = 16, 2↑↑2 = 2↑2 = 4. – r.e.s. Sep 28 '13 at 3:57
• If you look at "generalized commutative hyperoperations" one can find an approach by A. Bennet in the 1910'th to define operations on an fractional index between "+" (=index 0) and "*" (=index 1). In this spirit using base $b=\sqrt 2$ instead of Bennet's $\exp()$ and $\log()$ to base $e$ all fractional indexed commutative operations between "+", "*", "^" and so on have the property that $x+y$ which is also $x \circ_0 y$ and all $x \circ_k y$ equal $x+y = x \circ_k y = x \cdot y = ...$ See the example "multiplication-table" at math.stackexchange.com/a/1272791/1714 – Gottfried Helms Jan 21 '19 at 0:31
• This has to do with the fact that these are binary operations. – Allawonder Dec 28 '19 at 10:15

Given a polynomial $p(x)$ of degree $n$, let $a$ be the leading coefficient. Then:

$$\sum_{k=0}^n (-1)^k{n\choose k}p(x-k)=an!$$

This happens to be equivalent to:

$$p^{(n)}(x)=an!$$

where $p^{(k)}$ is the $k$th derivative of $p(x)$.

The surprising part is that the sum can actually obtain the leading coefficient without any remaining reference to the polynomial aside from the factorial of the degree.

Let $p_n$ be the probability that a random permutation in the symmetric group $S_n$ doesn't have fixed points. Then $\lim_{n\to\infty}p_n=\frac{1}{e}$.

I was amazed the first time I saw this exercise!

• No big surprise. This is just an application of the inclusion-exclusion formula and $\displaystyle{e^x=\sum_{n\geq0}\frac{x^n}{n!}}$ – Taladris Oct 19 '13 at 12:44
• Of course that's how it's proven, but it's still surprising when you first see it! Many of the facts on this post are easy and not surprising once you know what's going on behind the scenes! – rfauffar Oct 19 '13 at 18:14

Plot the graphs of the functions $$f(x)=\dfrac{2(x^2+|x|-6)}{3(x^2+|x|+2)}+\sqrt{16-x^2}$$ and $$g(x)=\dfrac{2(x^2+|x|-6)}{3(x^2+|x|+2)}-\sqrt{16-x^2}$$ in $x\in[-4,4]$ on the same plane.

• I made this one on valentine's day: desmos.com/calculator/xzwffxyucr – Simply Beautiful Art Mar 20 '17 at 23:47
• Very nice picture. There is another two functions those make a similar picture: $$y=|x|^{3/2}\pm\sqrt{1-x^2}.$$ May be you can add more components to make this more nice :) – Bumblebee Mar 22 '17 at 5:19

Something I recently saw on Abstruse Goose (although I don't recall the exact link).

$$10^2+11^2+12^2=13^2+14^2$$

Moreover, one can easily prove that this is the only sequence of five consecutive positive numbers which have this property!

• Nice! How would you prove your last claim? – dreamer Sep 29 '13 at 9:02
• @rbm: Simplify and solve the polynomial equation: $$(x-1)^2+x^2+(x+1)^2=(x+2)^2+(x+3)^2$$ – Asaf Karagila Sep 29 '13 at 9:04
• Ah that's clever. Thanks – dreamer Sep 29 '13 at 9:06

The continued fraction of The Golden Ratio:

$\frac{1+\sqrt5}{2}=[1;,1,1,1,\dots]=[1,\bar1]$

Also: $\frac{1+\sqrt5}{2}=\sqrt{1+\sqrt{1+\sqrt{1+\dots}}}$.

It's funny noone mentioned the hockey-stick identity, partial sum of columns in a Pascal triangle:

$$\sum_{k=0}^{m}\binom{n+k}{k}=\binom{n+m+1}{n}$$

http://www.artofproblemsolving.com/Wiki/index.php/Combinatorial_identity

• Is not this what is called Vandermonde's identity? – Allawonder Dec 28 '19 at 10:19

This one really surprised me: $$\int_0^{\pi/2}\frac{dx}{1+\tan^n(x)}=\frac{\pi}{4}$$

I was really amazed by discovering that the squared arcsine function has a pretty nice Taylor series at the origin: $$\arcsin^2(z)=\frac{1}{2}\sum_{n\geq 0}\frac{(2z)^{2n}}{n^2\binom{2n}{n}}$$ Even more amazed by the variety of techniques one may employ to prove such identity: combinatorial convolutions, hypergeometric transformations, (poly)logarithmic integrals, the Lagrange inversion theorem, the residue theorem, Legendre polynomials, Euler's Beta function, creative telescoping... They're all pretty interesting.

$$\sum_{n=1}^{+\infty}\frac{\mu(n)}{n}=1-\frac12-\frac13-\frac15+\frac16-\frac17+\frac1{10}-\frac1{11}-\frac1{13}+\frac1{14}+\frac1{15}-\cdots=0$$ This relation was discovered by Euler in 1748 (before Riemann's studies on the $$\zeta$$ function as a complex variable function, from which this relation becomes much more easier!).

Another notable relation is the following, on the partition function, due to Ramanujan: $$p(n)=\frac1{\pi\sqrt2}\sum_{k=1}^{N}\sqrt k\left(\sum_{h\mod k}\omega_{h,k}e^{-2\pi i\frac{hn}{k}}\right)\frac d{dn}\left(\frac{\cosh\left(\frac{\pi\sqrt{n-\frac1{24}}}{k}\sqrt{\frac23}\right)-1}{\sqrt{n-\frac1{24}}}\right)+O\left(n^{-\frac14}\right)\;.$$ Then one of the most impressive formulas is the functional equation for the $$\zeta$$ function, in its asimmetric form: it highlights a very very deep and smart connection between the $$\Gamma$$ and the $$\zeta$$: $$\pi^{-\frac s2}\Gamma\left(\frac s2\right)\zeta(s)= \pi^{-\frac{1-s}2}\Gamma\left(\frac{1-s}2\right)\zeta(1-s)\;\;\;\forall s\in\mathbb C\;.$$

• There must be a typo in the last expression, it should be $\pi^{\frac{1-s}2}\Gamma\left(\tfrac s2\right)\zeta(s)= \pi^{\frac s2}\Gamma\left(\tfrac{1-s}2\right) \zeta(1-s)\;\;\;\forall s\in\mathbb C$. – g.kov Dec 28 '19 at 14:26

One more with continued fractions. In 2003 there was a discussion in sci.math about the continued fractions of powers of $e$ - if I recall correctly, then that of even powers are somehow folklore. But examining the pattern to the depth we came to the following infinite continued fraction with a variable parameter: $$\operatorname{cfe}(x)= [1,\tfrac1x-1,1, \quad 1,\tfrac3x-1,1, \quad 1,\tfrac5x-1,1, \quad \ldots ]$$ where the pattern is easily recognizable.
Then "generalize" the continued fraction and allow irrational values for $x$. Then

$$x = \operatorname{cfe}( \ln(x) ) \qquad \qquad x \ne 1$$ or $$x= 1+\cfrac{1} {(\tfrac1{\ln x}-1) + \cfrac{1} {1+\cfrac{1} {1+\cfrac{1} {(\tfrac3{\ln x}-1) + \cfrac{1} {1+\cfrac{1} {1+\cfrac{1} {(\tfrac5{\ln x}-1) + \cfrac{1} {1+\cfrac{1} {...}}}} }}}}}$$

I'm a fan of approximations, and I ran into this one the other day:

$$\Gamma^{(k)}(1) \sim (-1)^k\, \Gamma(k+1) \quad \text{as } k \to \infty.$$

The form is interesting in that it relates the $k^\text{th}$ derivative of the function at $1$ to the value of the function at $k+1$.

The approximation isn't too bad either; the relative error is on the order of $2^{-k}$, i.e.

$$\Gamma^{(k)}(1) = (-1)^k\, \Gamma(k+1) \left[1 + O\!\left(2^{-k}\right)\right] \quad \text{as } k \to \infty.$$

$${\large\sqrt{\vphantom{\Large A}\,\color{#ff0000}{20}\color{#0000ff}{25}\,}\, = 45 = \color{#ff0000}{20} + \color{#0000ff}{25}}$$

• Oh come on, we can do better than that: $$\sqrt{3025}=30+25$$ $$\sqrt{99801}=998+1$$ $$\sqrt{4941729}=494+1729$$ $$\sqrt{7441984}=744+1984$$ $$\sqrt{52881984}=5288+1984$$ $$\sqrt{60481729}=6048+1729$$ – Franklin Pezzuti Dyer Dec 1 '18 at 17:53
• @Frpzzd It's quite fine there are so many cases. However, your second example is wrong because $\displaystyle 999^2 = 998001 \not= 99801$. My ONLY example appears in the book "The Man who Counted". – Felix Marin Dec 3 '18 at 20:40

$$\sin \pi x=\pi x\prod_{n=1}^{\infty}\left(1-\frac {x^2}{n^2}\right).\quad \text {(L. Euler).}$$ Obviously the LHS and RHS have the same set of zeroes but that alone does not imply equality. And putting $x=1/2$ into it, we derive the Wallis product for $\pi,$ which itself is remarkable, especially as Wallis was Newton's immediate predecessor in the "Lucas chair" and obtained his product without the full generality of the methods of calculus developed by Newton..

$$\frac{11}{10}\cdot\frac{1111}{1110}\cdot\frac{111111}{111110}\cdot\frac{11111111}{11111110}\cdots =1.101001000100001000001\cdots$$

I got this integral,

$$\int_{-\infty}^{+\infty}\frac{\mathrm dt}{(\phi^n t)^2+\pi^2(F_{2n+1}-\phi F_{2n})(e^{\gamma}t^2+t-1)^2}=1$$

Where $$F_{n}$$ is the Fibonacci number,$$\phi$$ is the Golden ratio and $$\gamma$$ is the Euler's constant.

This formula thrills me and stirs my mind as nothing could for years... $$\int^\infty_{0}\!\!e^{-3\pi x^2}\frac{\sinh(\pi x)}{\sinh(3 \pi x)}\,dx=\frac{1}{e^{2\pi/3}\cdot \sqrt3} \sum^\infty_{n=0}\frac{e^{-2n(n+1)\pi}}{(1+e^{-\pi})^{2}(1+e^{-3\pi})^{2}\cdots(1+e^{-(2n+1)\pi})^{2}}$$

• Can I ask why this one in particular? – Bennett Gardiner Sep 28 '13 at 8:05
• @BennettGardiner This formula consists of A combination of irrational constants , trigonometric function and more over a connection of an infinite sum and infinite integral. – Shivam Patel Sep 28 '13 at 12:30
• Note that $\sinh(x) = \frac 12 (\mathrm e^x - \mathrm e^{-x})$, so in fact you have "only" a combination of exponential functions under the integral. And it would be more impressive if the RHS was missing the $\pi$. – filmor Sep 30 '13 at 13:15

A surprising family of series for $e$ can be derived by algebraically combining the terms in Newton's series expansion:

$$e=\sum_{k=0}^{\infty } \dfrac{1}{k!}=\dfrac{1}{0!}+\dfrac{1}{1!}+\dfrac{1}{2!}+\dfrac{1}{3!}+\dfrac{1}{4!}+\dfrac{1}{5!}+\ldots.$$

Here are a few examples:

$$e=\sum _{k=0}^{\infty } \frac{2k+1}{(2k)!}=\frac{1}{0!}+\frac{3}{2!}+\frac{5}{4!}+\frac{7}{6!}+\frac{9}{8!}+\frac{11}{10!}+\ldots$$

$$2e=\sum _{k=0}^{\infty } \frac{k+1}{k!}=\frac{1}{0!}+\frac{2}{1!}+\frac{3}{2!}+\frac{4}{3!}+\frac{5}{4!}+\frac{6}{5!}+\ldots$$

$$1/e=\sum _{k=0}^{\infty } \frac{1-2k}{(2k)!}=\frac{1}{0!}-\frac{1}{2!}-\frac{3}{4!}-\frac{5}{6!}-\frac{7}{8!}-\frac{9}{10!}-\ldots~.$$

Beyond being pretty, these series converge substantially faster than Newton's series. For more formulas and details on derivation see: http://www.brotherstechnology.com/math/cmj-supp.html

• $$1=\sum_{k=0}^{\infty } \frac{1}{k!(k+2)}=\frac{1}{0!2}+\frac{1}{1!3}+\frac{1}{2!4}+\frac{1}{3!5}+\frac{1}{4!6}+\frac{1}{5!7}+\ldots$$ – Fred Kline Jan 30 '14 at 21:56
• Nice, @FredKline. The above link leads to a list of formulas at: brotherstechnology.com/math/e-formulas.html. This is a variation of Formula (26) with n=1: $$1=\sum _{k=1}^{\infty } \frac{k}{(k+1)!}=\frac{1}{2!}+\frac{2}{3!}+\frac{3}{4!}+\frac{4}{5!}+\frac{5}{6!}+\frac{6}{7!}+\ldots~.$$ – Harlan Feb 1 '14 at 0:23

$$\int_0^{\frac{\pi}{2}} x\ln(\tan(x))\ dx=\frac{7}{8}\zeta(3)$$

Möbius inversion formula may be an example. Also Ramanujan's Partition Congruences were surprising to me when I first saw them.

I apologize if this is already here. I thought it was but I can't find it, so I must have seen it somewhere else on the site.

$$\begin{matrix} f(x) & \displaystyle\int f(x)dx \\[6pt] \hline x^2 & \dfrac{x^3}{3} \\[6pt] x & \dfrac{x^2}{2} \\[6pt] 1 & x \\[6pt] \dfrac{1}{x} & \color{red}{\log(x)} \\[6pt] \dfrac{1}{x^2} & -\dfrac{1}{x} \\[6pt] \dfrac{1}{x^3} & -\dfrac{1}{2x^2} \\[6pt] \dfrac{1}{x^4} & -\dfrac{1}{3x^3} \end{matrix}$$

$\displaystyle{\int x^n dx} = \frac{x^{n+1}}{n+1}$

$\displaystyle{\lim_{n \rightarrow -1} \left(\frac{x^{n+1}}{n+1}\right)} = \log(x)$?

No. Let $g(x,n)=\frac{x^{n+1}}{n+1}$.

For $x\in(0,\infty)$, you have:
$g(x,n)>0$ as $n\rightarrow -1$ from above, and
$g(x,n)<0$ as $n\rightarrow -1$ from below, but
$\log(x)<0$ on $x\in(0,1)$ and $\log(x)>0$ on $x\in(1,\infty)$.

I wish I understood this better.

Let me add my personal favorite one here:

$$\sum_{\substack{m, n \geq 1\\\gcd(m,n)=1}} \frac{1}{m^2n^2}=\frac{5}{2}.$$

You can generalize this into $$\mathop{\sum_{n_1=1}^\infty\cdots\sum_{n_j=1}^\infty}\limits_{(n_1,\dots,n_j)=1} \frac1{n_1^{k_1} \cdots n_j^{k_j}}=\frac{\zeta(k_1)\zeta(k_2)\cdots \zeta(k_n) }{\zeta(k_1+k_2+\cdots+k_n)},$$ where $$\zeta$$ is the Riemann's zeta function.

I believe McShane's identity is very surprising, and is pretty different from the rest of these answers.

Let $$\Sigma_{1,1}$$ be a once punctured torus with a complete, finite volume, hyperbolic metric $$g$$. Let $$C$$ be the set of closed geodesic curves which do not intersect themselves (simple closed curves). Then we have the following identity:

$$\sum_{c \in C} \frac{1}{1+e^{\mathrm{length}(c)}}=\frac{1}{2}.$$

This is extremely interesting because there are many such metrics up to isometry. In fact the space of such metrics is naturally isomorphic to the modular curve $$\mathbb H^2/ \mathrm{PSL}(2,\mathbb{Z})$$. In general the set of lengths of simple closed curves will be very different for different metrics. For example, for any $$\epsilon >0$$ you can find a metric with a $$c \in C$$ of that length. When $$\epsilon$$ is small the corresponding term is very close to $$1/2$$. There are also metrics where every curve in $$C$$ has length greater than 1.

This identity, and generalizations of this, end up being related to important work by Maryam Mirzakhani, who won the Fields medal.

I believe that one that should be mentioned is the prime number theorem:
Let $\pi(x)$ be the number of primes not exceeding $x$. Then:
$\pi(x)\sim \frac{x}{logx}$

I find the Young-Frobenius identity, found on p. 8 here, surprising:

A partition $\lambda\vdash n$ of an integer $n\geq0$, i.e. a sequence $(\lambda_{1}, \cdots,\lambda_{k})$ with $\lambda_{1}\geq \cdots \geq \lambda_{k}>0$ and $\lambda_{1} + \cdots + \lambda_{k}=n$, can be identified with a diagram consisting of $k$ left-justified rows of boxes, where row $i$ (starting from the top) has $\lambda_{i}$ boxes, called a Young diagram of size $n$. For some Young diagram $\lambda$ of size $n$, a Young tableau of shape $\lambda$ is an assignment of integers $1$ through $n$ to the boxes of $\lambda$; a Young tableau is standard if these numbers increase in each row and column. For example, one size-$10$ standard Young tableau of shape $(5,4,1)$ is:

Now let $f^{\lambda}$ denote the number of standard Young tableaux of shape $\lambda$. Then the numbers of standard Young tableaux of each shape of size $n$ satisfy this identity:

$$\sum_{\lambda\vdash n}^{}(f^{\lambda})^{2}=n!$$

• I presume there's some relatively clean bijection based around a canonical cycle structure of a permutation that explains this? – Steven Stadnicki Nov 22 '14 at 16:29

One of the most beautiful formulas in combinatorics:
Cayley's Formula:Number of labelled trees on $n$ vertices $=n^{n-2}$

And here are some interersting, yet not-so-popular combinatorial identities:

Notations:
$F_n = n^{th}$ Fibonacci number
$H_n =$ $n^{th}$ Harmonic number; $H_n = 1+ \frac{1}{2}+\frac{1}{3} +...+\frac{1}{n}$

1. $$\sum_{n \ge 1} {\frac{F_n}{2^n}} =2$$
2. $$\sum_{n \ge 1} {n \frac{F_n}{2^n}} =10$$
3. $$\sum_{n \ge 1} {n^2\frac{F_n}{2^n}} =94$$
4. For $0 \le m \le n$, $$\sum_{k=m}^{n-1} {\binom{k}{m} \frac {1}{n-k}}= \binom{n}{m}(H_n -H_m)$$

I have found the identity below from which can be deduced infinitely many others of increasing degree by the elementary theory of elliptic curves.

The 6-tuples indicate the coefficients of, respectively $n^5$, $n^4$, $n^3$, $n^2$, $n$ and $1$
$$A = (1, 10, -8, 16, 64, -32) \\ B = (1, -10, -8, -16, 64, 32) \\ C = (-1, 8, 8, -16, 80, 32) \\ D = (-1, -8, 8, 16, 80, -32)$$

Then it is verified the identity $$n(6n^4 +24n^2 + 96)^3 = A^3 + B^3 + C^3 + D^3$$

The factor of $n$ at the left is never nul for any integer $n$.

• I wanted to write 6$n^4$ + 24$n^2$ + 96 at the left but I could not do – Piquito Apr 22 '15 at 0:14