# Strange Inequality

While trying to write a program that finds triangular square pentagonal numbers, I needed to solve the following inequality: $$\frac{1}{3}*2^{4n-3}*[[(1+\sqrt 3)^{4n-1}-(1-\sqrt 3)^{4n-1}]^2-[(1+\sqrt 3 + \epsilon)^{4n-1}-(1-\sqrt 3 - \epsilon)^{4n-1}]^2]< 0.5$$

Given a value of n (which is very large, around $10^{100}$, how can I figure out a value for $\epsilon$?

• Try binary search. – Peter Sep 8 '16 at 22:13

If $n$ is large, then $(1-\sqrt 3)^{4n-1}\approx 0$ and $(1-\sqrt 3 - \epsilon)^{4n-1}\approx 0$

Your inequality simplifies to $$\frac{1}{3}*2^{4n-3}*[(1+\sqrt 3)^{8n-2}-(1+\sqrt 3 + \epsilon)^{8n-2}]< 0.5$$

Rewrite as: $$\frac{1}{3}*2^{4n-3}*(1+\sqrt 3)^{8n-2}*[1-(1 + \frac\epsilon{1+\sqrt 3})^{8n-2}]< 0.5$$

Use binomial expansion to say (first order approximation)

$$\frac{1}{3}*2^{4n-3}*(1+\sqrt 3)^{8n-2}*\left [1-\left (1 + \frac{\epsilon({8n-2})}{1+\sqrt 3}\right )\right ]< 0.5$$

Looks like $\epsilon$ will be negative?

$$\frac{1}{3}*2^{4n-3}*(1+\sqrt 3)^{8n-3}*({2-8n})(-\epsilon)< 0.5$$

$$(-\epsilon)< \frac{1.5}{2^{4n-3}*(1+\sqrt 3)^{8n-3}*({8n-2})}$$

• I let $\epsilon$ represent the inaccuracy in the floating point representation of sqrt(3), thank you so much! – Husnain Raza Sep 8 '16 at 22:49