Question: How can I show that the subspace $\{x\in \ell\_2 \mid \sum\_{n=1} ^\infty x\_n \frac 1{\sqrt n}=0\}$ is dense in $\ell\_2$?

Can it be done with "simple" tools just by using the definition of a dense subspace? or can it be done by using the fact that $\ell\_2$ is a Hilbert space?

Answer: 
A linear factor $x-a$ would require $a\mid p$, i.e., $a\in\{-p,-1,1,p\}$, and none of these is a root: $f(-p)=p^4\ne 0$, $f(-1)=p\ne 0$, $f(1)=p+2\ne 0$, $f(p)=p^4+2p\ne 0$.
Remains the case of two quadratic factors
$$f(x)=(x^2+ax+b)(x^2+cx+d).$$
Then $bd=p$ (constant term), $a+c=0$ (cubic term), $ad+bc=1$ (linear term), and $0=b+ac+d$ (quadratic term).
Then $a(d-b)=ad+cb=1$, so $a=\pm1$, $ c=\mp1$.
This makes $b+d=1$ from the quadratic term, wheras $b+d=\pm(1+p)$ form the constant term and the possibly factorizations of $p$.
Split the problem into two cases: $p = 2$ and $p \neq 2$.

If $p = 2$, consider reduction modulo $3$. If $p \neq 2$, consider reduction modulo $2$. 

In both cases, it's easy to check that the polynomial has no roots over the finite field, but the possibility remains that the polynomial can factor into a product of two quadratics. However, because there are a very limited number of irreducible quadratic polynomials over $\mathbb{Z}\_2$ and $\mathbb{Z}\_3$, it is relatively easy to determine that the polynomial is ultimately irreducible over the given finite field. 

We can then conclude that the polynomial is irreducible over $\mathbb{Q}$ (see Test 3 [**here**](https://math.dartmouth.edu/archive/m31w05/public_html/Reducibility.pdf)).