Find all positive integers $a$ and $n$ such that $\sqrt{n-a}+\sqrt{(n-a)+1}+\dots+\sqrt{n}+\dots+\sqrt{(n+a)-1}+\sqrt{n+a}$ is rational. Find all positive integers $a$ and $n$ such that $$\sqrt{n-a}+\sqrt{(n-a)+1}+\dots+\sqrt{n}+\dots+\sqrt{(n+a)-1}+\sqrt{n+a}$$
is rational.
Attempt to problem: I tried considering $a$ as a constant and from that to find $n$, but it got nowhere.
 A: Let us assume that $n>a$, so none of the expressions under the squares is $0$. If this is not the case, the proof below can easily be adapted to cover such situation.
If you write $n-k= q_k^2\cdot m_k$, where $m_k$ is square-free, for $-a\leqslant k\leqslant a$, the above expression $E$ is equal to $\sum_{k=-a}^aq_k\sqrt{m_k}$. Of course, some $m_k$'s are maybe equal to $1$, but all $q_k$'s are positive. Let $u_1,\ldots,u_l$ be all different numbers among $m_k$'s. So $E$ is actually equal to $\sum_{i=1}^l\alpha_i\sqrt{u_i}$, where $\alpha_i$ is the sum of those $q_k$'s for which $m_k=u_i$. In particular, all $\alpha_i$'s are strictly positive. Note one more thing, since $a\geqslant 1$, we must have some $m_k\neq 1$, i.e. $l\geqslant 2$. Now we see that it is not possible that $E\in\mathbb Q$, because $\sqrt{u_i}$'s are linearly independent over $\mathbb Q$, because $u_i$'s are pairwise different square-free numbers, and in $E=\sum_{i=1}^l\alpha_i\sqrt{u_i}$ at least one member doesn't vanish.
Thus such positive $n$ and $a$ don't exist. 
