Let $A$ be a symmetric matrix with even diagonal and elements in $\mathbb{Z}_p$ and nonzero discriminant. (Yes, $p$ can be two) and $a$ an nonzero integer. Suppose there exists a solution to $x^{\top}Ax/2=a$ where $x$ is a primitive vector. Is there an explicit $\delta>0$ depending only on $A$ and $a$ such that if $\Vert a_{ij}-c_{ij} \Vert<\delta$ and $C$ has the same determinant as $A$ then $x^{\top}Cx/2=a$ will have a primitive solution?
• No. Take $a=0$ and $A$ the zero matrix. Then you're asking if a quadratic form $q$ in $n$ variables over $\mathbf{Q}_p$ has a nontrivial solution to $q(x)=0$ when the coefficients of $q$ are all close to 0, but such closeness to zero is irrelevant since anything can be scaled to satisfy that condition. And there are many non-degenerate quadratic forms in 2, 3, or 4 variables over a local field with no nontrivial rational zero. Please give the actual motivation so it can be determined if you meant to ask something else. – nfdc23 Oct 23 '17 at 21:13