The beauty of Infinity


Infinity and its infinite beauty.



Today we're going to take a brief look at the beauty of infinity, through:


to represent some of the most well known and beautiful mathematical constants, like π, e and φ.

# Definitions

Before diving into it, let's begin with some simple definitions:

1) Infinite sum:

`\sum_{n=1}^(\infty)\frac{1}{n} = \frac{1}{1} + \frac{1}{2} + \frac{1}{3} + \...`

2) Infinite product:

`\prod_{n=1}^(\infty)\frac{1}{n} = \frac{1}{1} * \frac{1}{2} * \frac{1}{3} * \...`


3) Continued fractions:

`\underset{n=1}{\overset{\infty}{\mathbf{K}}}\frac{1}{n} = \frac{1}{1 + \frac{1}{2 + \frac{1}{3 + \...}}}`

4) Nested radicals:

`\underset{n=1}{\overset{\infty}{\mathbf{R}}}(n + R)^(1/2) = \sqrt{1 + \sqrt{2 + \sqrt{3 + \...}}}`

5) Limit:

`\lim_{n to \infty}(1 + 1/n)^n = (1 + 1/n)^n`, where `n` approaches `\infty`.

# Infinite sums


`\sum_{n=0}^(\infty)\frac{1}{n!} = \e`

`\sum_{n=0}^(\infty)\frac{x^n}{n!} = \e^x`

`\sum_{n=0}^(\infty)\frac{n^x}{n!} = \e * Bell_x`

`\sum_{n=0}^(\infty)\frac{x * (-1)^n}{n!} = \frac{x}{\e}`

`\sum_{n=0}^(\infty)\frac{n!}{(2n+1)!!} = \frac{\pi}{2}`

`\sum_{n=0}^(\infty)\frac{n!*(2n)!!}{(2n+1)!} = \frac{\pi}{2}`

`\sum_{n=0}^(\infty)\frac{n!}{(2n+2)!!} = \log(2)`

`\sum_{n=0}^(\infty)\frac{1}{(2n+2)*2^n} = \log(2)`

`\sum_{n=0}^(\infty)\frac{1}{(2n+1)*(2n+2)} = \log(2)`

`\sum_{n=1}^(\infty)\frac{(2n-1)!}{2^(2n) * (n!)^2} = \log(2)`

`\sum_{n=0}^(\infty)\frac{1}{(2n+1)*2^n} = \sqrt(2) * log(1+\sqrt(2))`

`\sum_{n=0}^(\infty)\frac{(2n + 1)!!}{(2n+1)!} = \sqrt(\e)`

`\sum_{n=0}^(\infty)\frac{(n!)^2}{(2n+1)!} = \frac{2\pi}{3\sqrt(3)}`

`\sum_{n=0}^(\infty)\frac{2^(n+1) * (n!)^2}{(2n+1)!} = \pi`

`\sum_{n=0}^(\infty)\frac{(-1)^n}{2n+1} = \frac{\pi}{4}`

`\sum_{n=0}^(\infty)\frac{\i^(2n+1)}{2n+1} = \frac{\pi\i}{4}`

`\sum_{n=0}^(\infty)\frac{(\i\sqrt(2)-i)^(2n+1)}{2n+1} = \frac{\pi\i}{8}`

`\sum_{n=1}^(\infty)\frac{1}{n^2} = \frac{\pi^2}{6}`

`\sum_{n=1}^(\infty)\frac{1}{n * (n+1)^2} = 2-\frac{\pi^2}{6}`

`\sum_{n=0}^(\infty)\frac{(-1)^n}{(2n+1)^3} = \frac{\pi^3}{32}`

`\sum_{n=0}^(\infty)\frac{1}{n + (2n+1)^2} = \frac{\pi}{6} + \ln(2)`

`\sum_{n=0}^(\infty)\frac{1}{(2n+1)^2} = \frac{\pi^2}{8}`

`\sum_{n=0}^(\infty)\frac{(-1)^n}{(n+1)^2} = \frac{\pi^2}{12}`

`\sum_{n=0}^(\infty)\frac{2^(2n) * B_{2n}}{(2n)!} = \frac{e^2+1}{e^2-1}`

`\sum_{n=0}^(\infty)\frac{(2x)^(2n) * B_{2n}}{(2n)!} = x*\coth(x)`,      `0 < |x| < \pi`.

`\sum_{n=0}^(\infty)\frac{(-1)^n * (2x)^(2n) * B_{2n}}{(2n)!} = x*\cot(x)`,      `0 < |x| < \pi`.

`\sum_{n=1}^(\infty)\frac{2^(2n) * (2^(2n)-1) * x^(2n-1) * B_{2n}}{(2n)!} = \tanh(x)`,      `|x| < \pi/2`.

`\sum_{n=1}^(\infty)\frac{(-1)^(n-1) * 2^(2n) * (2^(2n)-1) * x^(2n-1) * B_{2n}}{(2n)!} = \tan(x)`,      `|x| < \pi/2`.

`sum_{n=0}^(\infty)\frac{1}{(2n+x)^k} = -\frac{\psi^((k-1))(x/2)}{2^k * (k-1)!}`

`\sum_{n=0}^(\infty)\frac{(-1)^n}{(2n+1)^2} = \beta(2)`

`\sum_{n=1}^(\infty)\frac{1}{n+n^2} = 1`

`\sum_{n=0}^(\infty)\frac{x^(2n) * (-1)^n}{(2n)!} = \cos(x)`

`\sum_{n=0}^(\infty)\frac{x^(2n+1) * (-1)^n}{(2n+1)!} = \sin(x)`

`\sum_{n=0}^(\infty)\frac{(\x\i)^(2n+1) - (-\x\i)^(2n+1)}{(2n+1)!} = \frac{2}{\csc(x)}i`

`\sum_{n=0}^(\infty)\frac{x^(2n)}{(2n)!} = \cosh(x)`

`\sum_{n=0}^(\infty)\frac{x^(2n+1)}{(2n+1)!} = \sinh(x)`

`\sum_{n=0}^(\infty)\frac{(2x)^n}{n!} = \frac{2}{1-\tanh(x)}-1`

`\sum_{n=0}^(\infty)\frac{(2x)^n}{n!} = 1-\frac{2}{1-\coth(x)}`

`\sum_{n=0}^(\infty)\frac{x^(2n+1) - (-x)^(2n+1)}{(2n+1)!} = \frac{2}{\csch(x)}`

`\sum_{n=0}^(\infty)\frac{(\frac{sqrt(x^2+1)-1}{x}i)^(2n+1)}{2n+1} = \frac{\tan^-1(x)}{2}i`

`\sum_{n=0}^(\infty)\frac{(\frac{\sqrt(x^2+1)-1}{x})^(2n+1)}{2n+1} = \frac{\sinh^-1(x)}{2}`

`\sum_{n=0}^(\infty)\frac{(\frac{1-sqrt(1-x^2)}{x}i)^(2n+1)}{2n+1} = \frac{\sin^-1(x)}{2}i`

`\sum_{n=0}^(\infty)\frac{(\frac{1-sqrt(1-x^2)}{x})^(2n+1)}{2n+1} = \frac{\tanh^-1(x)}{2}`

`\sum_{n=0}^(\infty)\frac{(sqrt(\frac{x-1}{x+1})i)^(2n+1)}{2n+1} = \frac{\sec^-1(x)}{2}i`

`\sum_{n=0}^(\infty)\frac{sqrt(\frac{x-1}{x+1})^(2n+1)}{2n+1} = \frac{\cosh^-1(x)}{2}`

`\sum_{n=0}^(\infty)\frac{(sqrt(\frac{1-x}{1+x})i)^(2n+1)}{2n+1} = \frac{\cos^-1(x)}{2}i`

`\sum_{n=0}^(\infty)\frac{sqrt(\frac{1-x}{1+x})^(2n+1)}{2n+1} = \frac{\sech^-1(x)}{2}`

`\sum_{n=0}^(\infty)\frac{((1-sqrt(1-\frac{1}{x^2}))\x\i)^(2n+1)}{2n+1} = \frac{\csc^-1(x)}{2}i`

`\sum_{n=0}^(\infty)\frac{((1-sqrt(1-\frac{1}{x^2}))\x)^(2n+1)}{2n+1} = \frac{\coth^-1(x)}{2}`

`\sum_{n=0}^(\infty)\frac{((sqrt(\frac{1}{x^2}+1)-1)\x\i)^(2n+1)}{2n+1} = \frac{\cot^-1(x)}{2}i`

`\sum_{n=0}^(\infty)\frac{((sqrt(\frac{1}{x^2}+1)-1)\x)^(2n+1)}{2n+1} = \frac{\csch^-1(x)}{2}`

`\sum_{n=0}^(\infty)\frac{x^(-2n-1)}{2n+1} = \coth^-1(x)`    for |x| > 1

`\sum_{n=0}^(\infty)\frac{x^\frac{2n}{y}}{(2n)!} = \cosh(x^(1/y))`

`\sum_{n=0}^(\infty)\frac{x^\frac{2n+1}{y}}{(2n+1)!} = \sinh(x^(1/y))`

`\sum_{n=0}^(\infty)\frac{1}{n^2 + (n+1)^2} = \tanh(\frac{\pi}{2}) * \frac{\pi}{2}`

`\sum_{n=0}^(\infty)\frac{(-1)^n}{n+1} = \ln(2)`

`\sum_{n=0}^(\infty)\frac{i^n}{n+1} = \frac{\pi}{4} + \log(\sqrt(2))\i`

`\sum_{n=0}^(\infty)\frac{i^n}{n!} = \cos(1) + \sin(1)\i`

`\sum_{n=0}^(\infty)\frac{i^n}{(2n)!} = \cosh((-1)^(1/4))`

`\sum_{n=1}^(\infty)\frac{1}{n^k * k^n} = Li_k(1/k)`    for |k| > 1

`\sum_{n=0}^(\infty)\frac{i^n}{\e^n} = \e/(\e-\i)`

`\sum_{n=0}^(\infty)\frac{(\frac{x-1}{x+1})^(2n+1)}{2n+1} = \frac{\ln(x)}{2}`

`\sum_{n=0}^\(\infty)\frac{\sum_{k=2}^(m)(\frac{k-1}{k+1})^(2n+1)}{2n+1} = \frac{\ln(m!)}{2}`

`\sum_{n=0}^(\infty)\frac{\prod_{k=0}^(j)(\a_k)^n}{n!} = exp(\prod_{k=0}^(j)\a_k)`

`\sum_{n=0}^(\infty)\frac{(-\frac{1}{4})^n * \cos^(-1)(3)^(2n)}{(2n)!} = \sqrt(2)`

`\sum_{n=0}^(\infty)\frac{\zeta(2n)}{(2n+1)*(2n+2)*2^(2n)} = \frac{-14*\zeta(3)}{8\pi^2}`

`[log(27/16) + \sum_{n=0}^(\infty)\frac{\zeta(2n) - 1}{(2n+1) * (2n+2) * 2^(2n)}] * \frac{-8\pi^2}{14} = \zeta(3)`

`\sum_{n=0}^(\infty)(-\frac{1}{4})^n * (\frac{1}{1+2n} + \frac{2}{1+4n} + \frac{1}{3+4n}) = \pi`

`\sum_{n=1}^(\infty)\frac{\log(n)}{n^2} = -\frac{pi^2}{6} * (\gamma - 12*log(\A) + log(2\pi))`


# Infinite products


`\prod_{p}\frac{1}{1-p^-2} = \frac{\pi^2}{6}`

`\prod_{n=1}^(\infty)\frac{4n^2}{4n^2-1} = \frac{\pi}{2}`

`\prod_{n=0}^(\infty)\exp(\frac{1}{n!}) = \e^\e`

`\prod_{n=1}^(\infty)\frac{4n^2+1}{4n^2-1} = \sinh(\frac{\pi}{2})`

`\prod_{n=1}^(\infty)\frac{4n^2-1}{4n^2+1} = \csch(\frac{\pi}{2})`

`\prod_{n=1}^(\infty)\frac{4n^3}{4n^3 - 3n + 1} = \pi`

`\prod_{n=1}^(\infty)\frac{(2n+1)^2-1}{(2n+1)^2} = \frac{\pi}{4}`

`\prod_{n=1}^(\infty)(1-\frac{1}{4n^2}) = \frac{2}{\pi}`

`\prod_{n=1}^(\infty)(1-\frac{x^2}{\pi^2 * n^2}) = \frac{\sin(x)}{x}`

`\prod_{n=0}^(\infty)(1-\frac{4x^2}{\pi^2 * (2n+1)^2}) = \cos(x)`

`\prod_{n=1}^(\infty)\frac{x*n^2}{x*n^2 - 1} = \frac{\pi}{\sqrt(x)*\sin(\frac{\pi}{\sqrt(x)})}`

`\prod_{n=1}^(\infty)\frac{x*pi^2*n^2}{x*pi^2*n^2 - 1} = \frac{\csc(\frac{1}{\sqrt(x)})}{\sqrt(x)}`

`\prod_{n=1}^(\infty)(1 + \frac{1}{n})^x (1 + \frac{x}{n})^(-1) = \Gamma(x+1)`

`\prod_{n=1}^(\infty)\exp(\frac{1}{n}-2) (\frac{1}{n} + 1)^(2n) = \frac{\exp(2+\gamma)}{2\pi}`

# Continued fractions


`\mathbf{K}(\frac{1}{1}) = φ - 1`

`\mathbf{K}(\frac{1}{2}) = \sqrt(2) - 1`

`\mathbf{K}(\frac{x-1}{2}) = \sqrt(x) - 1`

`\mathbf{K}(\frac{1}{x}) = \frac{\sqrt(x^2+4) - x}{2}`

`\mathbf{K}(\frac{x}{1}) = \frac{\sqrt(4x+1) - 1}{2}`

`\mathbf{K}(\frac{x}{x}) = \frac{\sqrt(x^2 + 4x) - x}{2}`

`\mathbf{K}(\frac{x}{y}) = \frac{\sqrt(y^2 + 4x) - y}{2}`

`\underset{n=0}{\overset{\infty}{\mathbf{K}}}(\frac{(-1)^n}{1}) = φ`

`\underset{n=1}{\overset{\infty}{\mathbf{K}}}(\frac{n}{n}) = \frac{1}{\e-1}`

`\underset{n=1}{\overset{\infty}{\mathbf{K}}}(\frac{1}{2n + 1}) = \frac{2}{\e^2-1}`

`\underset{n=0}{\overset{\infty}{\mathbf{K}}}(\frac{1}{2n + 1}) = \tanh(1)`

`\underset{n=1}{\overset{\infty}{\mathbf{K}}}(\frac{2n}{n-1}) = \coth(1)`

`\underset{n=0}{\overset{\infty}{\mathbf{K}}}(\frac{(2n+1)^2}{6}) = \pi-3`

`\underset{n=0}{\overset{\infty}{\mathbf{K}}}(\frac{(2n+1)^2}{2}) = \frac{4}{\pi}-1`

`\underset{n=1}{\overset{\infty}{\mathbf{K}}}(\frac{n^2}{2n + 1}) = \frac{4}{\pi}-1`

`\underset{n=1}{\overset{\infty}{\mathbf{K}}}(\frac{n^4}{2n + 1}) = \frac{12}{\pi^2}-1`

`\underset{n=1}{\overset{\infty}{\mathbf{K}}}(\frac{\floor(\frac{n+1}{2}) * \floor(\frac{n+2}{2})}{1}) = \frac{6}{\pi^2 - 6}-1`

`\underset{n=1}{\overset{\infty}{\mathbf{K}}}(\frac{n^2 * x^2}{2n + 1}) = \frac{x}{\tan^-1(x)}-1`


# Nested radicals

`\prod_{n=1}^(\infty)\frac{2}{\underset{1}{\overset{n}{\mathbf{R}}}(2+R)^(1/2)} = \frac{\pi}{2}`

`(1+R)^(1/2) = \sqrt(1+\sqrt(1+\sqrt(1+\...))) = φ`

`(x+R)^(1/2) = \sqrt(x+\sqrt(x+\sqrt(x+\...))) = \frac{1 + \sqrt(4x+1)}{2}`

`(1+R)^(1/3) = (1 + (1 + (1 + \...)^(1/3))^(1/3))^(1/3) = \rho`

`\lim_{n to \infty}((2 - \underset{1}{\overset{n}{\mathbf{R}}}(2 + R)^(1/2)) * 4^(n+1)) = (2 - \sqrt(2 + \sqrt(2 + \sqrt(2 + \...)))) * 4^(n+1) = \pi^2`

`\underset{n=1}{\overset{\infty}{\mathbf{R}}}(1 + n * R)^(1/2) = \sqrt(1 + 1*\sqrt(1 + 2*\sqrt(1 + 3*\...))) = 2`

`\underset{n=x}{\overset{\infty}{\mathbf{R}}}(1 + n * R)^(1/2) = \sqrt(1 + x*\sqrt(1 + (x+1)*\sqrt(1 + (x+2)*\...))) = x+1`

# Limits

`\lim_{n to \infty}(1 + 1/n)^n = \e`

`\lim_{n to \infty}(\frac{n-1}{n})^(-n) = \e`

`\lim_{n to \infty}[prod_{p}^(n) p^(1/n)] = \e`

`\lim_{n to \infty}[prod_{k=1}^(n) p_k^(1/(n \ln n))] = \e`

`\lim_{n to \infty}[\H_n - \ln n] = \gamma`

`\lim_{n to \infty}\frac{\exp(\H_n)}{n} = \exp(\gamma)`

`\lim_{n to \infty}[\zeta((n+1)/n) - n] = \gamma`

`\lim_{n to \infty}\frac{(n!)^2 * e^(2n)}{n^(2n+1)} = 2\pi`

`\lim_{n to \infty}\frac{n!}{\sqrt(n) * e^(-n) * n^n} = \sqrt(2\pi)`

`\lim_{n to \infty}[sum_{k=0}^(n)\frac{n! * n^(k-n)}{k!*(n-k)!}] = \e`

`\lim_{n to \infty}[(n-1)^(-n) * (n+1)^n] = \e^2`

`\lim_{n to \infty}[n^(1-n) * (n + x)^(n-1)] = \exp(\x)`

`lim_{n to \infty}\frac{2^(4n)*n*(n!)^4}{((2n+1)!)^2} = \frac{\pi}{4}`

`lim_{n to \infty}\frac{2^(4n-1) * (n!)^4}{(2n+1) * ((2n)!)^2} = \frac{\pi}{4}`

`lim_{n to \infty}\frac{2^(4n)*(n!)^3*(n-1)!}{((2n)!)^2} = \pi`

`lim_{n to \infty}\frac{2^(4n)*(n!)^3*(n+1)!}{((2n+1)!)^2} = \frac{\pi}{4}`

`lim_{n to \infty}\frac{4^n * (n!)^2}{(2n-1)!! * (2n+1)!!} = \frac{\pi}{2}`

`lim_{n to \infty}\frac{2^(8n)*n*(n+1)!*(n!)^7}{((2n+1)!)^4} = \frac{\pi^2}{16}`

`lim_{n to \infty}\frac{2^(8n+1)*(n+1)^4*(2n^2 + 2n + 1) * (n!)^8}{((2n+2)!)^4} = \frac{\pi^2}{8}`

`lim_{n to \infty}[n^2/4 - \frac{6n^2+6n+1}{12}*log(n) + sum_{k=1}^(n)k \ln k] = \log(\A)`

# Asymptotics

`sqrt(2\pi\n) * (n/e)^n ~~ n!`

`2^n * sqrt(2 \pi n) * (n/e)^n ~~ (2n)!!`

`2^(n+1/2) * (n/e)^n ~~ (2n-1)!!`

`2^(n+3/2) * ((n+1)/e)^(n+1) ~~ (2n+1)!!`

`n * (log(n) + log(2) - 1) + log(2 \pi n)/2 ~~ log((2n)!!)`

`n*log(n) + (n + 1/2)*log(2) - n ~~ log((2n-1)!!)`

`(n+1)*log(n+1) + (n + 3/2)*log(2) - n - 1 ~~ log((2n+1)!!)`

`\frac{2}{(2\pi)^n} * n! ~~ |B_n|`

`\sqrt(8\pi\n) * (\frac{n}{2\pi\e})^n ~~ |B_n|`

`\log(\sqrt(8\pi\n)) + n * (log(n) - log(2\pi) - 1) ~~ log(|B_n|)`

`-\frac{n^2}{4} + \frac{6n^2 + 6n + 1}{12} * log(n) + log(\A) ~~ \sum_{k=1}^(n) k \ln k`

`\sqrt(2\pi\n) * \exp(n*log(n) - n) * (\log(n) + \gamma) ~~ n!*\sum_{k=1}^(n) \frac{1}{k}`

`\log(\sqrt(2\pi\n)) + n*log(n) + log(log(n) + \gamma) - n ~~ log(n!*\sum_{k=1}^(n) \frac{1}{k})`

`\sqrt(2\pi) * (\frac{12n^2 + 24n + 12 + 1}{12\e\n + 12\e})^(n+1) * \frac{1}{\sqrt(n+1)} ~~ n!`

`1/2 * (\log(\frac{2\pi}{n+1}) - 2*(n+1) * \log(\frac{12\e\n + 12\e}{12n^2+24n+12+1})) ~~ \log(n!)`

`1/6 * (\log(8n^3 + 4n^2 + n + 1/30) - 6n + 6n*log(n) + 3\log(\pi)) ~~ \log(n!)`

`lim_{k to \infty}[\sqrt(2\pi) * (\frac{12n^2 + 24kn + 12k^2 + 1}{12\e\n + 12\e\k})^(n+k) * \frac{n!}{(n+k-1)!} * \frac{1}{\sqrt(n+k)}] ~~ n!`

# Implementations: