# 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 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. Sep 26 '13 at 19:48
• Pi seconds is a nanocentury! 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.)

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 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 :) Mar 22 '17 at 5:19

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.

$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? 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 (+, *, ↑, ↑↑, ↑↑↑, ...). Sep 27 '13 at 4:23
• @r.e.s. Can you explain that? Isn't 2 ↑↑ 2 = 16 ? 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. 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 Jan 21 '19 at 0:31
• This has to do with the fact that these are binary operations. 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.

• An instance of the binomial transform which, together with its inversion, form a nice couple of formulas. Oct 26 '15 at 17:39

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!}}$ 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! Oct 19 '13 at 18:14

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

• +1 Nice one! Easily proved using $$\int_a^bf(x)~dx=\int_a^bf(a+b-x)~dx$$ and adding. Jun 13 at 8:45

$$\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$. Dec 28 '19 at 14:26

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? 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$$ Sep 29 '13 at 9:04
• Ah that's clever. Thanks Sep 29 '13 at 9:06
• math.stackexchange.com/a/505421 May 29 at 3:50

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}}}$.

$${\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$$ 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". Dec 3 '18 at 20:40

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? Dec 28 '19 at 10:19

$$\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..

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.$$

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? 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. 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$. Sep 30 '13 at 13:15

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

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

This expression is from Francois Viète: $$\pi = \frac{2}{1} \times \frac{2}{\sqrt2} \times \frac{2}{\sqrt{2+\sqrt2}}\times \frac {2}{\sqrt{2+\sqrt{2+\sqrt2}}} \times \cdots$$

•I will love to add this nested radical from Ramanujan: $$\sqrt{1+2\sqrt{1+3\sqrt{1+4\sqrt{\cdots}}}}=3$$ •Also like to add this too:$$1+2+3+4+\cdots=-\frac{1}{12}$$ •This famous Stirling'sapproximation$$n!\approx\sqrt{2\pi n}{\left(\frac{n}{e}\right)}^n$$

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$$ 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~.$$ Feb 1 '14 at 0:23

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

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)$$

It has surprised me that

$$F_n^\star=\frac{\phi^n-(-\phi)^{-n}}{\sqrt5}$$

where $\phi$ is the golden ratio and $F_n^\star$ is the nth Fibonacci number. Then, one stumbles upon characteristic equations:

$$a_kF_{n+k}=a_{k-1}F_{n+k-1}+a_{k-2}F_{n+k-2}+\dots+a_0F_n$$

$$\implies F_n=b_kr_k^n+b_{k-1}r_{k-1}^n+\dots+b_1r_1^n$$

where $r$ is a solution of the equation

$$a_kr^k=a_{k-1}r^{k-1}+a_{k-2}r^{k-2}+\dots+a_0$$

assuming the roots do not repeat. The coefficients are determined based on initial values.

It then surprises me further that this extends to differential equations:

$$a_ky^{(k)}+a_{k-1}y^{(k-1)}+\dots+a_0y=0$$

$$\implies y=b_ke^{r_kx}+b_{k-1}e^{r_{k-1}x}+\dots+b_1e^{r_1x}$$

where $r$ is a root of the equation

$$a_kr^k+a_{k-1}r^{k-1}+\dots+a_0=0$$

again assuming roots do not repeat.

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.

Prime solutions for the Prouhet-Tarry-Escott problem of size ten ($10$ primes on the left side, other $10$ primes on the right side) .

$$2589701^k + 2972741^k + 6579701^k + 9388661^k + 9420581^k + 15740741^k + 15772661^k + 18581621^k + 22188581^k + 22571621^k$$ $$= 2749301^k + 2781221^k + 6835061^k + 8399141^k + 10314341^k + 14846981^k + 16762181^k + 18326261^k + 22380101^k + 22412021^k$$

( Prime solution, $k = 1, 2, 3, 4, 5, 6, 7, 8, 9$)

The most interesting identity I have come across so far is the Mellin Transform of Gauss' Hypergeometric Function with a negative $$x$$-argument which can be expressed as a combination of Beta and Gamma Functions

$$\mathcal{M}[_2F_1(a,b;c;-x)](s)=B(s,a-s)\frac{\Gamma(b-s)\Gamma(c)}{\Gamma(b)\Gamma(c-s)}$$

which again points out the extremely close relation between all these special functions in general.