6. (1994 Bulgarian Mathematical Olympiad) Find all integers $k$ such that there exists an integer $x$ satisfying the equation $\sqrt{39-6 \sqrt{12}}+\sqrt{k x(k x+\sqrt{12})+3}=2 k$.
6. It is known that $39-6 \sqrt{12}=(6-\sqrt{3})^{2}, k x(k x+\sqrt{12})+3=(k x+\sqrt{3})^{2}$, therefore, the original equation can be transformed into $6-\sqrt{3}+$ $|k x+\sqrt{3}|=2 k$, which means $|k x+\sqrt{3}|=2 k+\sqrt{3}-6$.

From * we know $2 k+\sqrt{3}-6 \geqslant 0, k \geqslant 3-\frac{\sqrt{3}}{2}$. Since $k$ is an integer, we have $k \geqslant 3$. Also, since $k, x$ are both integers, $k x+$ $\sqrt{3} \neq 0$. If $k x+\sqrt{3}>0$, then from * we get $k x+\sqrt{3}=2 k+\sqrt{3}-6$, which means $k(2-x)=6$. Noting that $k \geqslant 3$, and $k, x$ are both integers, from the above equation we get $\left\{\begin{array}{l}k=3 \\ x=0\end{array}\right.$ or $\left\{\begin{array}{l}k=6 \\ x=1\end{array}\right.$. If $k x+\sqrt{3}<0$, then from * we get $-(k x+\sqrt{3})=2 k+\sqrt{3}-6$, which means $(2+x) k+$ $2 \sqrt{3}-6=0$. In this equation, only $\sqrt{3}$ is an irrational number, the rest are integers, clearly this equation cannot hold, hence the integer solutions for $k$ are 3 or 6.