Let $a_1,\dots,a_n$ and $b_1,\dots,b_n$ be two sequences of rational numbers.
Is it possible that $\sqrt 7 = \sum_{m=1}^{n} a_m (-1)^{b_m}$?
Is it possible that $\sqrt{17}$ = $\sum_{m=1}^{n} a_m (-1)^{b_m}$?
How to prove or disprove these ?
Let $a_1,\dots,a_n$ and $b_1,\dots,b_n$ be two sequences of rational numbers.
Is it possible that $\sqrt 7 = \sum_{m=1}^{n} a_m (-1)^{b_m}$?
Is it possible that $\sqrt{17}$ = $\sum_{m=1}^{n} a_m (-1)^{b_m}$?
How to prove or disprove these ?
On
Let $d$ be an integer. The field extension $\mathbb{Q}(\sqrt{d}) / \mathbb{Q}$ is a abelian extension, and therefore it is a subextension of a cyclotomic field extension $\mathbb{Q}(\zeta) / \mathbb{Q}$ where $\zeta$ is some root of unity. Thus, $\sqrt{d} \in \mathbb{Q}(\zeta)$, that is, $\sqrt{d}$ is a rational function of $\zeta$.
Since $\mathbb{Q}(\zeta)/\mathbb{Q}$ is an algebraic extension, this further means that $\sqrt{d}$ is a polynomial in $\zeta$ with rational coefficients, which is easy to put into the form you seek.
In fact, because $\sqrt{d}$ is an algebraic integer, it must lie in $\mathbb{Z}[\zeta]$, we can even select the $a_m$ to be integers. In fact, we can even arrange to have all of the $a_m$ be equal to 1, if we allow roots of unity to be repeated in the sum.
Let $\zeta=e^{2\pi i/7}$. We know that $$ 1+\zeta+\zeta^2+\cdots+\zeta^6=0. $$ Let $$ S=\zeta+\zeta^2+\zeta^4. $$ Then by squaring we get $$ S^2=\zeta^2+\zeta^4+\zeta^8+2\zeta^3+2\zeta^5+2\zeta^6. $$ Observe that $\zeta^8=\zeta$. Subtract the above equation multiplied by two from this to get $$ S^2=-2-\zeta-\zeta^2-\zeta^4=-2-S. $$ Let $M=2S+1$. Then $$ M^2=4S^2+4S+1=4(-2-S)+4S+1=-7. $$ Therefore $M=\pm i\sqrt7$, and you can surely construct a sum of the required type from this.
The above recipe works for all primes $p$ instead of $p=7$ as long as you follow the rule that the exponents of $\zeta$ (here $1,2,4$) are the quadratic residues modulo $p$ (so you need $(p-1)/2$ terms in the sum $S$). Whether you get $+p$ or $-p$ as the square depends on the residue class of $p$ modulo $4$.
Look up Gauss' sums for details of the general case.