0$ and the implied constant depend only on the fixed parameters.
The estimate is uniform for $A\in\N_0$, $N\geq1$, and the displayed targets.
\end{theorem}
Taking $Q=1$ and, respectively, $t=0$ or arbitrary $t$ gives the densities
asked for in Problems 2 and 3 of Hajdu and Papp \cite{HP}.
Their Theorems 2.1 and 2.2 establish the single-prime case with valuation
modulus a power of that prime, including an explicit gap bound; their
Theorems 2.3 and 2.4 give finer results in a particular case modulo $8$.
The distribution of the valuation coordinates alone was established by
Berend and Kolesnik \cite{BK}. We include all ingredients needed for the
joint unit and valuation statement here, without asserting priority for
its special cases.
\begin{corollary}\label{cor:gaps}
Every set counted in Theorem~\ref{thm:composite} is infinite and relatively
dense in $\N_0$: some integer $L\geq1$, depending only on the fixed parameters,
has the property that every interval $[A,A+L)$, $A\in\N_0$, contains a
member of the set. Its natural density is
$(Q\varphi(m)\prod_i r_i)^{-1}$.
\end{corollary}
\begin{proof}
Set $d=(Q\varphi(m)\prod_i r_i)^{-1}$. Choose $L$ so large that
$CL^{1-\delta}0$, $\eta>0$,
\begin{equation}\label{eq:fourier}
\sup_{\xi\in\R}\left|p^{-k}\sum_{0\leq n0$,
\begin{equation}\label{eq:jointchars}
\sum_{A\leq n