Are the numbers $\sqrt{n^2 + q^2}$, $n=0,1,\dots$, linearly dependent over $\mathbb{Q}$?

Guided by the pythagorean triples $(9,12,15)$ and $(5,12,13)$, we can take $q=12$ and have $$\sqrt{5^2+12^2}-\frac{13}{15}\sqrt{9^2+12^2}=0.$$ Many pythagorean triples lend themselves to this.

I wonder if any counter-examples are not derived from a pythagorean triple...


Very interesting problem.

Let $q=A/B (A,B \in \mathbb{Z})$. I claim there exists $x \in \mathbb{Z}$ such that $\sqrt{A^2+q^2}$ and $\sqrt{(Ax)^2+q^2}$ are linearly dependent, meaning that there exist $y \in \mathbb{Z}$ such that $(Ax)^2 + A^2/B^2 = y^2 (A^2 + A^2/B^2)$, which is equivalent to $B^2x^2 - (B^2+1)y^2 = -1.$

Let $d = B^2+1$. Then the problem is to find units $p+q\sqrt{d}$ in $\mathbb{Q}(\sqrt{d})$ such that $B|p$ and with norm $-1$. We have $u=B+\sqrt{d}$ as a trivial solution, corresponding to $(x,y)=(1,1)$.

Then consider $u^3 = (B+\sqrt{d})^3 = (B^3+3Bd) + (3B^2+d)\sqrt{d}$, giving $(x,y)=(B^2+3d,3B^2+d) = (4B^2+3,4B^2+1).$

Explicitly, $ \sqrt{(4AB^2+3A)^2 + (A/B)^2} = (4B^2+1) \sqrt{A^2+(A/B)^2}$.