  We prove effective results on when a function can be approximated by a
Dirichlet polynomial with bounded coefficients. Assuming that \Phi(n) is an
increasing function we prove that the set of polynomials {\sum_{n=2}^N a_n
n^{it-1}: N \geq 2, |a_n| \leq \Phi(n)}, is dense in L^2(0,H) if and only if
\sum_{n=2}^\infty \frac{\log \Phi(n)} {n \log^2 n} = \infty. We also prove
variants of this result for generalized Dirichlet polynomials. The main tools
are theorems of Paley and Wiener related to quasianalyticity and the Pechersky
rearrangement theorem. We use this result to give precise conditions on when a
conjecture of Ramachandra is true and when it is false. We prove that whenever
\Phi(n) is a positive increasing function then \lim_{N \to \infty} \min_{|a_n|
\leq \Phi(n)} \int_0^H \abs{1+\sum_{n=2}^N a_n n^{it-1}}^2 dt =0, if and only
if the above sum is divergent. This has applications on lower bounds for
moments of the Riemann zeta-functions in short intervals close to Re(s)=1, and
to questions of Universality for zeta-functions on and close to their abscissa
of convergence.
