# Why some curious almost-identities

$$e^{\pi\sqrt{163}}$$

is almost an integer and strangely enough this isn't just a random coincidence but rather there exists some general theory

http://en.wikipedia.org/wiki/Heegner_number

behind the occurences of these almost integers (and their relation to other areas of number theory)

Surely there are many other strange identities such as:

$$\sqrt{2} \approx \frac{3}{5} + \frac{\pi}{7 -\pi}$$

I'm guessing that this "coincidence" is probably similar to the earlier example a special case of some general theory that relates rational expressions of pi to algebraic integers.

Can someone point me in the right direction if not explain it here itself?

• You mean $e^{\pi\sqrt{163}}$. Is there a reason for your guess?
– anon
Feb 5, 2014 at 4:17
• see: [ wolframalpha.com/input/?i=Heegner+number ] verbatim: The Heegner numbers have a number of fascinating connections with amazing results in prime number theory. In particular, the j-function provides stunning connections between e, pi, and the algebraic integers. They also explain why Euler's prime-generating polynomial n^2-n+41 is so surprisingly good at producing primes. Feb 5, 2014 at 4:21
• – Ben
Feb 5, 2014 at 5:44
• Your identity may be rewritten as $$\pi\approx\frac{392-175\sqrt{2}}{46}\approx3.1415(7)$$ Jan 22, 2016 at 1:01
• You can get more correct decimals using less digits: $$\pi\approx\frac{192-98\sqrt{2}}{17}\approx3.141592(4)$$ Jan 22, 2016 at 1:10

The approximation $$\sqrt{2} \approx \frac{3}{5} + \frac{\pi}{7 -\pi}$$

may be rewritten as $$\sqrt{2}-\frac{3}{5} \approx \frac{1}{\frac{7}{\pi} -1}$$

After some manipulation, this is found to be equivalent to $$\pi\approx\frac{392-175\sqrt{2}}{46}=\frac{7}{46}\left(56-25\sqrt{2}\right)$$ so, at least for this case, some theory relating $\pi$ to algebraic integers would suffice.

A useful direction is shown by the following series, which is related to a similar approximation to $\pi$:

$$\sum_{k=0}^{\infty} \frac{15!(k+1)}{(8k+1)_{15}}=\frac{15}{8}\left(1716-7\left(99\sqrt{2}-62\right)\pi\right)\approx 1$$

where $(a)_n$ is a rising factorial or Pochhammer symbol $a\times(a+1)\times...\times (a+n-1)$.

This gives the approximation

$$\pi \approx \frac{3676}{15(99\sqrt{2}-62)}=\frac{1838(62+99\sqrt{2})}{118185}$$

with eight correct decimal digits.

A general series that might provide an explanation for this approximation, as well as others of the form $a+b\sqrt{2}$ for rational $a$ and $b$, is given by

$$\sum_{k=0}^\infty \frac{c}{\prod_{i=1}^{7}((8k+i)(8k+16-i))^{w_i}} \approx 1,$$ with constant $c$ and binary weighting exponents $w_i$ taking values either $0$ or $1$. The example provided above is the particular case $w_i=1$ for all $i$ from $1$ to $7$.

The numerator $c$ may be set by letting the first term of the series equal $1$.

$$\sum_{k=0}^\infty \prod_{i=1}^7 \left(\frac{i(16-i)}{(8k+i)(8k+16-i)}\right)^{w_i} \approx 1,$$

A simple Dalzell-type integral that relates $\pi$ to approximations using $\sqrt{2}$ is given by

$$\pi=\frac{20\sqrt{2}}{9} - \frac{2\sqrt{2}}{3} \int_0^1 \frac{x^4(1 - x)^4}{1 + x^2 + x^4 + x^6}dx$$

The following example combines a rational approximation from below and an irrational approximation from above

$$\pi \approx \frac{1}{4}·\frac{25}{8}+\frac{3}{4}·\frac{20\sqrt{2}}{9}$$ to obtain an irrational one from below that improves over the rational one.

$$\pi= \frac{25}{32} + \frac{5\sqrt{2}}{3} + \int_0^1 \frac{x \left(1 - x\right)^4\left(\left(1 + x^4\right) \left(1 + 4 x + x^2\right) - 8 \sqrt{2} x^3\right)}{16 \left(1 + x^2 + x^4 + x^6\right)} dx$$

Since the integrand is non-negative in $\left(0,1\right)$, this integral is a proof that $$\pi > \frac{25}{32}+\frac{5\sqrt{2}}{3}$$

Hopefully a similar integral exists for your approximation. For instance, the integrand in

$$\frac{1}{184} \int_0^1 \frac{x^4(1 - x)^4}{1 + x^2 + x^4 + x^6} (210\sqrt{2}- (259 + 120 x (1 - x)^2) (1+x^4) ) dx \\= \pi-\frac{392-175\sqrt{2}}{46}$$

is small, so your approximation is justified, but unfortunately there is a sign change in $(0,1)$, so we do not know in advance whether it lies above or below $\pi$. This integral has been built combining linearly three Dalzell-type expressions for constants $\frac{22}{7}-\pi$, $\frac{377}{120}-\pi$ and $\frac{20\sqrt{2}}{9}-\pi$ in order to match your number.

The relationship between the above families of series and integrals can be established as in the proofs found in these answers: [1],[2].

Finally, the following integral evaluates to the error of your approximation and has small nonnegative integrand.

$$\frac{3+ 10 \sqrt{2}}{4393} \int_0^1 \frac{x^3(1 - x)^6}{1 + x^2 + x^4 + x^6} \left(3111662 - 2200275\sqrt{2} + 3465 \left(-898 + 635 \sqrt{2}\right) x^8\right) dx = \pi-\frac{7}{46}\left(56-25\sqrt{2}\right)$$

It is a linear combination of

$$\frac{4}{10\sqrt{2}-3}\int_0^1 \frac{x^3(1-x)^6}{1+x^2+x^4+x^6}dx = \pi-\frac{35}{10\sqrt{2}-3}$$

and

$$\frac{4}{10\sqrt{2}-3}\int_0^1 \frac{x^{11}(1-x)^6}{1+x^2+x^4+x^6}dx = \pi-\frac{17327}{495\left(10\sqrt{2}-3\right)}$$

• I don't see how this is an answer to the question. Mar 29, 2016 at 8:42
• @GerryMyerson This explains an approximation of the same form as the one in the question, so hopefully it points in some useful direction, as it was asked. I cannot discard that a similar series with a denominator of the form $\prod_{i=1}^{15} (8k+i)^{w_i}$, where coefficients $w_i$ take the value $0$ or $1$, directly explains the approximation. Mar 29, 2016 at 11:47
• How is $\pi\approx a+b\sqrt2$ of the same form as $\pi/(a-\pi)\approx b+\sqrt2$? Mar 29, 2016 at 21:46
• @GerryMyerson They are of the same form, but $a$ and $b$ are not the same. Solving for $\pi$ in $$\frac{\pi}{a-\pi} \approx b+\sqrt{2}$$ leads to $$\pi\approx a'+b'\sqrt{2}$$. If I made no mistake [here](math.stackexchange.com/questions/664175/…) $a'=\frac{392}{46}=\frac{196}{23}$ and $b'=\frac{175}{46}$ from the approximation by the OP. Mar 30, 2016 at 7:41
• @GerryMyerson Updated the answer with a parallel of Dalzell's integral using $\sqrt{2}$ Apr 28, 2017 at 10:09