Converting sums of square-roots to nested square-roots
When solving different equations, I have realised, that some roots containing only arithmetic operations and square roots (4th, 8th roots too, because they can be represented using only square roots) can be converted to nested square roots form. Examples (these are roots of equations of 2nd, 4th, 4th and 8th degree): $$\sqrt{2}+\sqrt{3}=\sqrt{5+\sqrt{24}}$$ $$\sqrt{2}+\sqrt{3}+\sqrt{6}=\sqrt{15+\sqrt{160+\sqrt{6912+\sqrt{18874368}}}}$$ $$1+\sqrt{2}+\sqrt{3}+\sqrt{6}=\sqrt{21+\sqrt{413+\sqrt{4656+\sqrt{16588800}}}}$$ $$\sqrt{2}+\sqrt{3}+\sqrt{5}=\sqrt{14+\sqrt{140+\sqrt{4096+\sqrt{8847360}}}}$$ However, I have failed to convert to such form following root (8th degree equation): $$3+\sqrt{2}+\sqrt{3}+\sqrt{5}$$ Performing any operations with it, number of square roots inside increases, what makes me think that converting that root is impossible.
So, question: Can it be done with that root and with what roots in general?
Some forms I was able to get: $$\sqrt{19+6 \sqrt{2}+6 \sqrt{3}+6 \sqrt{5}+2 \sqrt{6}+2 \sqrt{10}+2 \sqrt{15}}$$ $$\sqrt{19+2\left(\sqrt{33+6 \sqrt{30}}+\sqrt{37+6 \sqrt{30}}+\sqrt{51+6 \sqrt{30}}\right)}$$
If one don't know how I got those expressions, here you are an example.
$$\sqrt{2}+\sqrt{3}+\sqrt{5}=\sqrt{\left(\sqrt{2}+\sqrt{3}+\sqrt{5}\right)^2}=$$ $$=\sqrt{10+2 \left(\sqrt{15}+\sqrt{6}+\sqrt{10}\right)}=\sqrt{10+2 \left(\sqrt{15}+\sqrt{\left(\sqrt{6}+\sqrt{10}\right)^2}\right)}=$$ $$=\sqrt{10+2 \left(\sqrt{15}+\sqrt{16+4 \sqrt{15}}\right)}=\sqrt{10+2 \left(\sqrt{15}-a+a+\sqrt{16+4 \sqrt{15}}\right)}=$$ $$=\sqrt{10+2a+2 \left(\sqrt{\left(\sqrt{15}-a\right)^2}+\sqrt{16+4 \sqrt{15}}\right)}=$$ $$=\sqrt{10+2a+2 \left(\sqrt{15+a^2-2a \sqrt{15}}+\sqrt{16+4 \sqrt{15}}\right)}=$$ $$[2a=4 \Rightarrow a=2]$$ $$=\sqrt{14+2 \left(\sqrt{19-4\sqrt{15}}+\sqrt{16+4 \sqrt{15}}\right)}=$$ $$=\sqrt{14+2 \sqrt{\left(\sqrt{19-4\sqrt{15}}+\sqrt{16+4 \sqrt{15}}\right)^2}}=$$ $$=\sqrt{14+2 \sqrt{35+4 \sqrt{16+3 \sqrt{15}}}}=\sqrt{14+\sqrt{140+\sqrt{4096+\sqrt{8847360}}}}$$
Solution 1:
All difference between numbers of the form $$x=a+b\sqrt{2}+c\sqrt{3}+d\sqrt{5}\qquad\qquad (a,b,c,d\in\mathbb{Z}_+)$$ and $$y=a+b\sqrt{2}+c\sqrt{3}+d\sqrt{6}\qquad\qquad (a,b,c,d\in\mathbb{Z}_+)$$ is that their powers can be written (uniquely) as $$ x^p = k_{p1} + k_{p2}\sqrt{2} + k_{p3}\sqrt{3} + k_{p4}\sqrt{5} + k_{p5}\sqrt{6} + k_{p6}\sqrt{10} + k_{p7}\sqrt{15} +k_{p8}\sqrt{30}, \tag{1} $$ but $$ y^p = l_{p1} + l_{p2}\sqrt{2} + l_{p3}\sqrt{3} + l_{p4}\sqrt{6}, \tag{1'} $$ where $k_{pj}\in\mathbb{Z}_+$, $l_{pj}\in\mathbb{Z}_+$.
If one want to write $x$ in the form of nested radicals $$ x=\sqrt{a_1+\sqrt{a_2+\sqrt{...+\sqrt{a_{n-1}+\sqrt{a_n}}}}}, $$
then $x$ is the root of the polynomial of $2^n$-th degree $$ P(x) = \left(\left(\left(x^2-a_1\right)^2-a_2\right)^2-\cdots-a_{n-1}\right)^2-a_n, $$ $$ P(x) = x^{2^n} + p_{2^{n-1}-1}(a_1,...,a_n)x^{2^n-2}+\cdots + p_1 (a_1,...,a_n)x^2 + p_0(a_1,...,a_n), $$ $$ P(x) = \sum_{j=0}^{2^{n-1}} p_{j}(a_1,...,a_n)x^{2j}, $$ where $p_{j}(a_1,...,a_n)$ are polynomials of $a_1,...,a_n$ with integer coefficients.
Let's split polynomial $P(x)$ into $8$ linear (rational) independent parts:
$$ P(x) =\\ 1\cdot \sum_{j=0}^{2^{n-1}}p_j(a_1,...,a_n)k_{2j,1} \\ + \sqrt{2} \cdot \sum_{j=0}^{2^{n-1}}p_j(a_1,...,a_n)k_{2j,2} \\ + \sqrt{3} \cdot \sum_{j=0}^{2^{n-1}}p_j(a_1,...,a_n)k_{2j,3} \\ + \sqrt{5} \cdot \sum_{j=0}^{2^{n-1}}p_j(a_1,...,a_n)k_{2j,4} \\ + \cdots \\ + \sqrt{30} \cdot \sum_{j=0}^{2^{n-1}}p_j(a_1,...,a_n)k_{2j,8}.\tag{2} $$
Sum in each row must be equal to $0$.
But each sum as polynomial of $a_1,...,a_n$ depends on $n$ integer variables/values.
$8$ (non-linear) equations for $n$ values.
There must be very lucky coincidence if $4$ variables $a_1,a_2,a_3,a_4$ will support all $8$ equations.
I think, there must be $8$ nested radicals here to provide as many "free" variables $a_1,...,a_n$:
$$ a+b\sqrt{2}+c\sqrt{3}+d\sqrt{5} = \sqrt{a_1+\sqrt{a_2+\sqrt{...+\sqrt{a_7+\sqrt{a_8}}}}}. $$
It is hard to find such form at all.
Note: if $x$ is of the form $$ x = b\sqrt{2}+c\sqrt{3}+d\sqrt{5}, $$ then (see $(1)$) $$ x^{2j} = k_{2j,1}+k_{2j,5}\sqrt{6}+k_{2j,6}\sqrt{10}+k_{2j,7}\sqrt{15}, $$ (coefficients near $\sqrt{2},\sqrt{3},\sqrt{5},\sqrt{30}$ are $0$), so there are only $4$ rows in $(2)$.
A few examples of radicals of such form:
$$ \sqrt{2}+\sqrt{3}+\sqrt{7} = \sqrt{16+\sqrt{180+\sqrt{10\;496 + \sqrt{34\;406\;400}}}}, $$
$$ \sqrt{2}+2\sqrt{3}+\sqrt{5} = \sqrt{23+\sqrt{392+\sqrt{77\;824+\sqrt{3\;538\;944\;000}}}}, $$
$$ 3\sqrt{2}+\sqrt{3}+\sqrt{5} = \sqrt{32+\sqrt{672+\sqrt{229\;824+\sqrt{11\;943\;936\;000}}}}. $$
Solution 2:
Writing a number $\alpha$ in this nested square root form $$\sqrt{a_1+\sqrt{a_{2}+\sqrt{...\sqrt{a_n}}}} \; \; (1)$$ implies that $\alpha$ satisfies the equation $$(((x^2-a_1)^2-a_2)^2...)^2-a_n = 0 \; \; (2)$$ where the $a_i$ are integers. In fact, allowing both values for the square root, the numbers of the form (1) are precisely those satisfying equation (2).
Expanding out (2), we find that it is a monic polynomial in $x^2$ of degree $2^{n-1}$ with integer coefficients. For $n \ge 3$, the polynomial will have more than $n$ coefficients after the first, so these cannot be freely specified via choosing $a_1,...,a_n$. We do get, however, that if number $\alpha$ can be written in the form (1) then $\alpha^2$ is a root of a monic integer polynomial of degree $2^k$ for some $k \in \{0,1,2,...\}$.
If you generalise the form to $$a_1+\sqrt{a_2+\sqrt{a_{3}+\sqrt{...\sqrt{a_n}}}} \; \; (1*)$$ then the necessary condition becomes that $\alpha$ itself is a root of such a polynomial.
Roots of monic integer polynomials (of any degree) are called algebraic integers. See http://en.wikipedia.org/wiki/Algebraic_integer
Solution 3:
For any pair $(a,b)$ one can write
$$
\sqrt{a}+\sqrt{b} = \sqrt{A+2\sqrt{B}},\tag{1}
$$
where
$A=a+b$,
$B=ab$.
For any ordered triple $(a,b,c)$, such that $1\le a\le b \le c$, one can write $$ \sqrt{a}+\sqrt{b}+\sqrt{c} = \sqrt{A +2\sqrt{B+2\left(\sqrt{p}+\sqrt{q}\right)}} = \sqrt{A + 2\sqrt{B + 2\sqrt{C + 2\sqrt{D}}}},\tag{2} $$
where
$A=3a+b+c$,
$B=(a+b)(a+c)$,
$p = ac(b-a)^2$,
$q = ab(c-a)^2$,
$C = p+q$, (see $(1)$)
$D = pq$.
Note, that
$\sqrt{p} = (b-a)\sqrt{ac}$,
$\sqrt{q} = (c-a)\sqrt{ab}$,
$\sqrt{D} = a (b-a) (c-a) \sqrt{bc}$.
Maybe there is reason to search $\sqrt{a}+\sqrt{b}+\sqrt{c}+\sqrt{d}$ in the form $$\sqrt{a}+\sqrt{b}+\sqrt{c}+\sqrt{d}= \sqrt{A+2\sqrt{B+2\sqrt{C+2\sqrt{D+2\left(\sqrt{p}+\sqrt{q}+\sqrt{r}\right)}}}},\tag{3}$$ and (if success) apply $(2)$ to the sum $\sqrt{p}+\sqrt{q}+\sqrt{r}$.
Solution 4:
Here is other approach. I hope it is most helpful.
A.
For any vector $v$ with integer coefficients
$$
v = (a,b,c,d,e,f,g,h)
$$
denote linear combination
$$
x_v = a+b\sqrt{2}+c\sqrt{3}+d\sqrt{5}+e\sqrt{6}+f\sqrt{10}+g\sqrt{15}+h\sqrt{30}.\tag{1}
$$
Values $x_v$ generate ring (all sums, products of them has form $(1)$ etc).
Value $$ x_v^2-A $$ has according/appropriate vector with integer coefficients (vector $w=(a',b',c',d',e',f',g',h')$, where its coefficients are defined as $$ \begin{array}{l} a'=a^2+2b^2+3c^2+5d^2+6e^2+10f^2+15g^2+30h^2-A;\\ b'=2(ab+3ce+5df+15gh),\\ c'=2(ac+2be+5dg+10fh),\\ d'=2(ad+2bf+3cg+6eh),\\ e'=2(ae+bc+5fg+5dh),\\ f'=2(af+bd+3eg+3ch),\\ g'=2(ag+cd+2ef+2bh),\\ h'=2(ah+bg+cf+de).\tag{2} \end{array} $$
So, one can define vector transformation $$ w = T(v,A),\tag{3} $$ described by $(2)$.
B.
If there is representation
$$
3+\sqrt{2}+\sqrt{3}+\sqrt{5}=\sqrt{A_1+\sqrt{A_2+\sqrt{A_3+...+\sqrt{A_{n-1}+\sqrt{A_n}}}}},\tag{4}
$$
then for vector $v_0=(3,1,1,1,0,0,0,0)$ exist these transformations:
$$ v_1=T(v_0,A_1),\\ v_2=T(v_1,A_2),\\ ...\\ v_n=T(v_{n-1},A_n),\tag{5} $$ where $v_n$ iz zero-vector: $v_n=(0,0,0,0,0,0,0,0)$.
C.
Now, apply modular arithmetic to $(2), (3), (5)$.
For $m\in\mathbb{N}$ denote transformation
$$ z = T_m(v,A),\tag{3'} $$ where $z=(a'\bmod m, ~ b'\bmod m, ~ c'\bmod m, ... , ~ h'\bmod m)$, and $a',b',c',...,h'$ are defined in $(2)$.
If there exist transformations $(5)$ converting $v_0=(3,1,1,1,0,0,0,0)$ to $v_n=(0,0,...,0)$, then for any $m\in\mathbb{N}$ must exist transformations
$$ z_1=T_m(v_0,A_1),\\ z_2=T_m(z_1,A_2),\\ ...\\ z_n=T_m(z_{n-1},A_n),\tag{5'} $$
where $z_n=(0,0,0,0,0,0,0,0)$.
D.
For $n=4$ ($4$ nested rdicals), if we choose $m=5,7,10,11,...$, then for $0\le A_1,A_2,A_3,A_4 <m$ value $z_4$ cannot be zero-vector.
For $n=5$ one can use $m=11,13,17,19,...$ to see that $z_5$ cannot be $\vec{0}$.
For $n=6$ one can use $m=31, 41, 43, 47, ...$ to see that $z_6$ cannot be $\vec{0}$.
So, must be at least $n\ge 7$ radicals. (I'll update this answer after checking $n=7$).
How D is working (temporary part):
Example for $n=5$, $m=11$:
starting vector is (a[0]=3,b[0]=1,c[0]=1,d[0]=1,e[0]=...=h[0]=0)
I need to check if there is sequence $A[0],...,A[4]$ that generates (0,0,0,0,0,0,0,0).
It can be used "as is", or more smart:
if there is sequence $A[0], ..., A[2],A[3]$ that generates vector (a,b,c,d,e,f,g,h),
where $a$ can be nonzero;
or even so:
if there is sequence $A[0], ..., A[2]$ that generates vector (a,b,c,d,e,f,g,h),
where $a$ can be nonzero and one of $b,c,d,e,f,g,h$ is nonzero too.
If apply some modulo $m$, then each $A[j]$ is equivalent to $0$ or $1$ or $2$ or ... or $m-1$.
Then test:
for A[0]=0,1, ..., m-1
for A[1]=0,1, ..., m-1
for A[2]=0,1, ..., m-1
{
a[1] = (a[0]*a[0]+ 30*h[0]*h[0] - A[0]) mod m;
b[1] = 2(a[0]*b[0]+...+15*g[0]*h[0]) mod m;
...
h[1] = 2(a[0]*h[0]+...+d[0]*e[0]) mod m;
a[2] = (a[1]*a[1]+ 30*h[1]*h[1] - A[1]) mod m;
b[2] = 2(a[1]*b[1]+...+15*g[1]*h[1]) mod m;
...
h[2] = 2(a[1]*h[1]+...+d[1]*e[1]) mod m;
and
a[3], b[3], ..., h[3] same way;
and
a[4], b[4], ..., h[4] same way, but use 0 instead of A[3];
then check if only one of b[4],c[4],...,h[4] is nonzero (say d[4]);
if "yes", then success (possible solution);
then A[3] = a[4], and A[4] is based on this last non-zero term (like d[4]);
}