0$ there is a constant
$c_{\delta}$ such that
\[
\sum_{n\le N,\,G(n)>0}f(G(n)) \ll_{\delta}\,
N\prod_{p\le N}\Bigl(1-\frac{\rho(p)}{p}\Bigr)
\exp\left(\sum_{p\le N}\frac{f(p)\rho(p)}{p}\right),
\]
for $N\ge c_{\delta}\Vert G\Vert^{\delta}$.
\end{lemma}
For our application the range for $n$ will be an interval of length
$N\ll X$, which will have to be translated by a distance $O(X)$ in order
to produce the interval $(0,N]$. This has the effect of modifying the
coefficients of the original polynomial $G$. However even after this
translation we will have $\Vert G\Vert\ll X^3$. Given the form
(\ref{4.5}) of $F$ we see that $G$ will have three linear factors.
Moreover we have
$\rho(p)=1$ for $p\mid m$, while if $p\nmid mH$ we will have $\rho(p)=3$,
since $p\mid a_ib_j-a_jb_i$ would imply $p\mid\Delta$. We will therefore have
\begin{eqnarray}
S_0(m)&\ll&\sum_{n\le N,\,G(n)>0}r_1(G(n)) \notag \\
&\ll& N\prod_{p\le N}\Bigl(1-\frac{\rho(p)}{p}\Bigr)
\exp\left(\sum_{p\le N}\frac{r_1(p)\rho(p)}{p}\right) \notag \\
&\ll& N\prod_{33}\frac{1-1/p}{1-3/p}
\prod_{3

2$ the $p$-adic density $\sigma_p$ is merely
\begin{equation}\label{8.1}
\sigma_p=\lim_{e\to\infty}p^{-4e}N(p^e),
\end{equation}
where
\[
N(p^e)=\#\left\{ \begin{matrix} x_1,\ldots,x_6 \\ \hfil \md{p^e}
\end{matrix} \,:\,
\begin{matrix}
L_1(x_1,x_2)L_2(x_1,x_2)\equiv x_3^2+x_4^2\md{p^{e}}, \\
L_3(x_1,x_2)L_4(x_1,x_2)\equiv x_5^2+x_6^2\md{p^{e}}
\end{matrix}
\right\}.
\]
Similarly, for $p=2$ the $2$-adic density in $\Rog$ will be given by
(\ref{8.1}), for $p=2$, but with
\begin{equation}
\label{8.2}
N(2^e)=
\#\left\{
\begin{matrix} x_1,\ldots,x_6 \\[4pt] \hfil \md{2^e}
\end{matrix} :\,
\begin{matrix} 2\nmid x_1, \hfill \\
L_1(x_1,x_2)L_2(x_1,x_2)\equiv x_3^2+x_4^2\md{2^{e}}, \\
L_3(x_1,x_2)L_4(x_1,x_2)\equiv x_5^2+x_6^2\md{2^{e}}
\end{matrix}\right\}.
\end{equation}
Finally, the real density is given by
\[\sigma_{\infty}=\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}
\int_{x_1,\ldots,x_6}e(\alpha Q_1+\beta Q_2)dx_1\ldots dx_6\,d\beta
d\alpha,\]
where
\[Q_1=L_1(x_1,x_2)L_2(x_1,x_2)-x_3^2-x_4^2,\quad Q_2=
L_3(x_1,x_2)L_4(x_1,x_2)-x_5^2-x_6^2.\]
Here $(x_1,x_2)$ runs over $\sR$, and $x_3,x_4,x_5,x_6$ each run
over an interval of the form $[-cX,cX]$, with $c$ a suitably large
constant. According to part
(iii) of {\bf NC2}, this is sufficient.
For a prime $p\equiv 1\md{4}$ one easily finds that
\begin{multline*}
\#\bigl\{x,y\md{p^e}: x^2+y^2\equiv A\md{p^e}\bigr\} \\
= \begin{cases}
p^e+ep^{e-1}(p-1) & \hbox{if } p^e\mid A, \\[4pt]
(1+\nu_p(A))p^{e-1}(p-1) & \hbox{if } \nu_p(A)0$ for every $p$.
We now evaluate $\sigma_p$ when $p\nd\Delta$. For such primes, (\ref{3.12})
gives
\[\rho(p^{\mu_1},p^{\mu_2},p^{\mu_3},p^{\mu_4})=p^{a+b}\]
where $a$ is the maximum of the $\mu_i$, and if $a=\mu_j$, say, then
$b$ is the maximum of the set
$\{\mu_1,\mu_2,\mu_3,\mu_4\}\setminus\{\mu_j\}$. When
$\min(\mu_1,\mu_2)=\min(\mu_3,\mu_4)=0$ we therefore have
\begin{equation}\label{8.8}
\rho(p^{\mu_1},p^{\mu_2},p^{\mu_3},p^{\mu_4})=
p^{\mu_1+\mu_2+\mu_3+\mu_4},
\end{equation}
so that (\ref{8.6}) yields
\begin{eqnarray*}
\sigma_p&=&(1-1/p)^2\sum_{\min(\mu_1,\mu_2)=\min(\mu_3,\mu_4)=0}
p^{-\mu_1-\mu_2-\mu_3-\mu_4}\\
&=&(1-1/p)^2\Bigl\{\sum_{\min(m,n)=0}p^{-m-n}\Bigr\}^2\\
&=& (1+1/p)^2,
\end{eqnarray*}
when $p\equiv 1\md{4}$. This proves (\ref{1.14}) for such primes.
The computation for the case $p\equiv -1\md{4}$ is somewhat more
involved. We first evaluate
\[S_1=\sum_{\min(\mu_1,\mu_2)=0,\;\min(\mu_3,\mu_4)=0}
(-1)^{\mu_1+\mu_2+\mu_3+\mu_4}
\rho(p^{\mu_1},p^{\mu_2},p^{\mu_3},p^{\mu_4})^{-1}.\]
Using the argument of the previous paragraph we find that
\begin{eqnarray*}
S_1&=&\sum_{\min(\mu_1,\mu_2)=0,\;\min(\mu_3,\mu_4)=0}
(-1)^{\mu_1+\mu_2+\mu_3+\mu_4}p^{-\mu_1-\mu_2-\mu_3-\mu_4}\\
&=&\Bigl\{\sum_{\min(m,n)=0}(-1)^{m+n}p^{-m-n}\Bigr\}^2\\
&=&(p-1)^2(p+1)^{-2}.
\end{eqnarray*}
Next we consider
\[S_2=\sum_{\mu_1,\mu_2,\mu_3\ge 1}(-1)^{\mu_1+\mu_2+\mu_3}
\rho(p^{\mu_1},p^{\mu_2},p^{\mu_3},1)^{-1}.\]
We may write this as
\begin{eqnarray*}
S_2&=&\sum_{a,b,c\ge 1}(-1)^{a+b+c}p^{\min(a,b,c)}p^{-a-b-c}\\
&=&\sum_{k=1}^{\infty}p^k\sum_{\min(a,b,c)=k}(-1)^{a+b+c}p^{-a-b-c}\\
&=&\sum_{k=1}^{\infty}p^k
\Bigl\{\sum_{a,b,c=k}^{\infty}(-1)^{a+b+c}p^{-a-b-c}-
\sum_{a,b,c=k+1}^{\infty}(-1)^{a+b+c}p^{-a-b-c} \Bigr\} \\
&=&\sum_{k=1}^{\infty}p^k \left\{(\frac{(-p^{-1})^k}{1+p^{-1}})^3-
(\frac{(-p^{-1})^{k+1}}{1+p^{-1}})^3\right\} \\
&=&\frac{1+p^{-3}}{(1+p^{-1})^{3}}\sum_{k=1}^{\infty}p^k(-p^{-1})^{3k}\\
&=&-\frac{1+p^{-3}}{(1+p^{-1})^{3}}\frac{1}{p^2+1}.
\end{eqnarray*}
Of course we get the same result for any sum in which three of the
$\mu_i$ are at least 1 and the fourth is 0. The next sum to compute is
\longpage
\[S_3=\sum_{\mu_1,\mu_2\ge 1}(-1)^{\mu_1+\mu_2}
\rho(p^{\mu_1},p^{\mu_2},1,1)^{-1}.\]
This is easily found to be
\[S_3=\sum_{a,b\ge 1}(-1)^{a+b}p^{-a-b}=(p+1)^{-2}.\]
Now if
\[S_4=\sum_{\mu_1,\mu_2\ge 1,\;\min(\mu_3,\mu_4)=0}
(-1)^{\mu_1+\mu_2+\mu_3+\mu_4}
\rho(p^{\mu_1},p^{\mu_2},p^{\mu_3},p^{\mu_4})^{-1},\]
then
\[S_4=2S_2+S_3=
-\frac{(1-p^{-1})^2}{(1+p^{-1})^2}\frac{1}{p^{2}+1}.\]
Clearly we have the same result if the r\^{o}les of $\mu_1,\mu_2$ and
$\mu_3,\mu_4$ are interchanged. Finally we examine
\[S_5=\sum_{\mu_1,\mu_2,\mu_3,\mu_4=1}^{\infty}
(-1)^{\mu_1+\mu_2+\mu_3+\mu_4}
\rho(p^{\mu_1},p^{\mu_2},p^{\mu_3},p^{\mu_4})^{-1}.\]
Now, according to (\ref{3.12}) we have
\begin{eqnarray*}
S_5&=&p^{-2}\sum_{\mu_1,\mu_2,\mu_3,\mu_4=0}^{\infty}
(-1)^{\mu_1+\mu_2+\mu_3+\mu_4}
\rho(p^{\mu_1},p^{\mu_2},p^{\mu_3},p^{\mu_4})^{-1}\\
&=&p^{-2}\{S_1+2S_4+S_5\},
\end{eqnarray*}
whence
\[S_5=\frac{S_1+2S_4}{p^2-1}=-S_4.\]
Then, as in the proof of (\ref{8.7}), we have
\[\sigma_p=(1+1/p)^2\{S_1+4S_4+4S_5\}=(1+p^{-1})^2S_1=(1-p^{-1})^2.\]
This establishes (\ref{1.14}) when $p\equiv -1\md{4}$.
Having dealt with the evaluation of the densities $\sigma_p$, our next
task is to interpret the sums $E^{(u,v)}_p$ given by (\ref{1.13}). Only
primes $p\equiv -1\md{4}$ need concern us. We claim
that whenever $p\equiv -1\md{4}$ we have \longpage
\begin{equation}\label{8.9}
E^{(u,v)}_p=p^{-2u-2v}(1+1/p)^{-4}
\lim_{e\to\infty}p^{-6e}N^{(u,v)}(p^e),
\end{equation}
where
\[
N^{(u,v)}(p^e)=
\#\left\{
\begin{matrix} x_1,\ldots,x_{10} \quad \\ \md{p^e} \end{matrix} :\,
\begin{matrix} L_1(x_1,x_2)\equiv p^u(x_3^2+x_4^2)\md{p^{e}}, \\
L_2(x_1,x_2)\equiv p^u(x_5^2+x_6^2)\md{p^{e}},\\
L_3(x_1,x_2)\equiv p^v(x_7^2+x_8^2)\md{p^{e}},\\
L_4(x_1,x_2)\equiv p^v(x_9^2+x_{10}^2)\md{p^{e}}
\end{matrix}
\right\}.
\]
If $p^u\mid L_1(x_1,x_2)$, then the number of pairs $x_3,x_4$ modulo $p^e$
for which
\[p^{-u}L_1(x_1,x_2)\equiv x_3^2+x_4^2\md{p^{e-u}}\]
will be given by (\ref{8.3}). Thus if $p^{e}\mid L_1(x_1,x_2)$ there are $O(p^e)$
such pairs. Otherwise suppose that $p^f\,\Vert\,L_1(x_1,x_2)$. Then if
$f-u$ is even there are $p^{e+u-1}(p+1)$ pairs, and if $f-u$ is odd
there are no such pairs. If we set $u_1=u_2=u$ and $u_3=u_4=v$ we
then find that
\[N^{(u,v)}(p^e)=p^{4e+2u+2v-4}(p+1)^4
\twosum{0\le \nu_i0$. Thus
\begin{equation}\label{8.10}
E^{(u,v)}_p>0 \quad \mbox{if}\quad 2\mid \nu_p(L_1(x_1,x_2))-u\quad
\mbox{and}\quad 2\mid \nu_p(L_3(x_1,x_2))-v.
\end{equation}
We now show that
$\nu_p(L_1(x_1,x_2))$ and $\nu_p(L_3(x_1,x_2))$ have opposite
parities whenever $p\in\sP$. Since $T_-(p)=-T_+(p)$ for such a
prime, and $E^{(u,v)}_p\ge 0$ for all $u,v$, we will have
$E^{(0,0)}_p=E^{(1,1)}_p=0$. The claim then follows from (\ref{8.10}).
\longpage
Conversely we now show that if $\nu_p(L_1(x_1,x_2))$ and
$\nu_p(L_3(x_1,x_2))$ have opposite parities, and $p\equiv -1\md{4}$,
then $p\in\sP$. For such a prime, it follows from (\ref{8.10}) that either
$E^{(1,0)}_p>0$ or $E^{(0,1)}_p>0$ . However we have already seen
that $E^{(1,0)}_p=E^{(0,1)}_p=0$ unless $p\mid\Delta_{12}\Delta_{34}$.
Thus if $\nu_p(L_1(x_1,x_2))$ and
$\nu_p(L_3(x_1,x_2))$ have opposite parities, and $p\equiv -1\md{4}$,
then $p\mid\Delta$. Thus $p$ must occur in the product for $\ep$, whence
$T_-(p)=\pm T_+(p)$. Since either $E^{(1,0)}_p>0$ or $E^{(0,1)}_p>0$
we cannot have $T_-(p)= T_+(p)$, so that we must indeed have
$p\in\sP$.
We have therefore shown that the set $\sP$ consists precisely of those
primes $p\equiv-1\md{4}$
which divide $L_1(x_1,x_2)L_3(x_1,x_2)$ to an odd power. Since part
(iii) of {\bf NC2} implies that
$L_1(x_1,x_2)L_3(x_1,x_2)$ is positive, we conclude from part (iv) of
{\bf NC2} that
\begin{equation}\label{8.11}
\chi(\nu\nu')\equiv
L_1(x_1,x_2)L_3(x_1,x_2)\equiv(-1)^{\#\sP}\md{4}.
\end{equation}
On the other hand we have
\[\prod_{p\mid\Delta,\,\chi(p)=-1}T_{-}(p)/T_{+}(p)=(-1)^{\#\sP},\]
and since $\ep=-1$ we deduce that
\[(-1)^{\#\sP}=-\chi(\nu\nu').\]
This contradicts (\ref{8.11}), and therefore
completes the proof of Theorem 2.
\section{Examples}
In this section we shall discuss Theorem 2 in the context of the
examples (\ref{1.9}), (\ref{1.10}) and (\ref{1.17}). We begin with
(\ref{1.9}), which we repeat here as
\[y_1(y_1+4y_2)=x_3^2+x_4^2,\quad (7y_1+16y_2)(19y_1+44y_2)=x_5^2+x_6^2.\]
This has been shown to
have no nontrivial rational points, even though it has nonsingular
points in every completion of $\Q$. We take the region $\sR^{(0)}$
to be the square $(0,1)^2$, so that parts (i), (ii) and (iii) of
{\bf NC2} will be satisfied. Moreover part (iv) is
clearly satisfied with $\nu=1$ and $\nu'=-1$.
The existence of nonsingular local points is sufficient to ensure
that $\sigma_p>0$ for every prime $p$. However for the forms in (\ref{1.9})
we find that $\Delta_{12}\Delta_{34}=2^4$, so that
$E_p^{(1,0)}=E_p^{(0,1)}=0$ for
any primes entering into the product in (\ref{1.15}). It follows that
$T_{-}(p)=T_{+}(p)$ for such primes, so that $\ep=\chi(\nu\nu')=\chi(-1)=-1$.
Thus the failure of the Hasse Principle is fully explained by Theorem
2, at least as far as points with $(y_1,y_2)\in\Rog$ are concerned.
We turn now to the example (\ref{1.10}), namely
\[y_1(y_1+4y_2)=x_3^2+x_4^2,\quad (y_1+8y_2)(13y_1+64y_2)=x_5^2+x_6^2.\]
Although there are rational points in this example, we showed in \S 1
that all such points have $y_2/y_1\ge -1/8$. We shall therefore
consider the application of Theorem 2 to two different regions. We
begin by examining the case
\[
y_1, y_1+4y_2>0, \quad y_1+8y_2<0, \quad 13y_1+64y_2<0,
\]
for which there are no rational points. Here we must replace $L_3$
and $L_4$ by $-L_3$ and $-L_4$ respectively, to produce linear forms
which will all be positive. Having made this change we then take
$\sR^{(0)}=(0,1)^2$.
Then parts (i), (ii) and (iii) of {\bf NC2} will
hold. We also see that part (iv) holds,
with $\nu=1$ and $\nu'=-1$. We may now proceed as
in the previous example, noting that $\Delta_{12}\Delta_{34}=2^5\cdot5$.
Once again it follows that $\ep=-1$, so that $\Rog$ produces no
solutions.
On the other hand, if we look at the case
\[
y_1, y_1+4y_2>0, \quad y_1+8y_2>0, \quad 13y_1+64y_2>0,
\]
we may again work with $\sR^{(0)}=(0,1)^2$.
This time we have $\nu=\nu'=1$ in part (iv) of Normalization Condition
2. The value $\Delta_{12}\Delta_{34}=2^5\cdot5$ is the same as before, so
that (\ref{1.15}) yields $\ep=\chi(\nu\nu')=\chi(1)=1$. It therefore follows
that the density of rational points in $\Rog$ is twice the
product of local densities, while the density of rational points in
the first case was of course zero.
The examples we have looked at so far all have $\ep=\pm 1$. However
other values may occur, as the example (\ref{1.17})
\[x_1(x_1+12x_2)=x_3^2+x_4^2,\quad (x_1+4x_2)(x_1+16x_2)=x_5^2+x_6^2,\]
will demonstrate. We shall use the region
\[\sR=\bigl\{00$. Similarly, for $u=1$,
$v=0$, the congruences
\begin{gather*}
x_1\equiv 3(x_3^2+x_4^2)\md{3^e},\quad
x_1+12x_2\equiv 3(x_5^2+x_6^2)\md{3^e}, \\
x_1+4x_2\equiv x_7^2+x_8^2\md{3^e},
\quad x_1+16x_2\equiv x_9^2+x_{10}^2\md{3^e}
\end{gather*}
require $x_1=3x'_1$, say, so that they are equivalent to
\begin{gather*}
x'_1\equiv x_3^2+x_4^2\md{3^{e-1}},\quad
x'_1+4x_2\equiv x_5^2+x_6^2\md{3^{e-1}}, \\
3x_1+4x_2\equiv x_7^2+x_8^2\md{3^e},
\quad 3x_1+16x_2\equiv x_9^2+x_{10}^2\md{3^e}.
\end{gather*}
There is now a nonsingular solution with $x'_1=x_2=1$, so that
$E_3^{(1,0)}>0$, as required.
Thus (\ref{1.7}) provides an example with $0<1+\ep<2$. We illustrate
this example numerically. Since $\sigma_2=2$, we see that (\ref{1.14})
yields
\[\prod_p\sigma_p=\frac{2\sigma_3}{(1-1/3)^2}\prod_p(1+\chi(p)/p)^2
=\frac{18}{\pi^2}\sigma_3.\]
Moreover one finds from (\ref{1.11}) that
\[
\sigma_3\Bigl(1+\frac{T_-(3)}{T_+(3)}\Bigr)=\frac{16}{9}(T_+(3)+T_-(3))
=\frac{32}{9}(E^{(0,0)}_3+E^{(1,1)}_3).
\]
One may now evaluate $E^{(0,0)}_3$ and $E^{(1,1)}_3$ by a somewhat
tedious calculation along the lines of that given in the previous
section to prove (\ref{1.14}). The starting point is the fact that
(\ref{3.12}) remains true for $p=3$, except when
$\min(e_1,e_2)>\max(e_3,e_4)$, in which case
\[\rho(3^{e_1},3^{e_2},3^{e_3},3^{e_4})=3^{e_1+e_2-1},\]
or $\min(e_3,e_4)>\max(e_1,e_2)$, in which case
\[\rho(3^{e_1},3^{e_2},3^{e_3},3^{e_4})=3^{e_3+e_4-1}.\]
The conclusion is that
\[E^{(0,0)}_3=\frac{9}{20} \quad \mbox{and}\quad
E^{(1,1)}_3=\frac{1}{20}.\]
It follows that we will have asymptotically $2X^2$ solutions to
$(\ref{1.17})$ in $\sR_2$. This is illustrated by Table 2, in which
\[S(X)=\sum_{\x\in\Rog}r(L_1(\x)L_2(\x))r(L_3(\x)L_4(\x)).\]
\begin{table}
\begin{center}
Table 2\\
\mbox{}\\
\renewcommand{\arraystretch}{1.2}
\renewcommand{\tabcolsep}{.8em}
\begin{tabular}{|r|r|r|}\hline
\multicolumn{1}{|c}{$X$}&\multicolumn{1}{|c}{$S(X)$}&
\multicolumn{1}{|c|}{$S(X)/2X^2$}\\ \hline
1000&1993472&0.9967\ldots\\ \hline
2000&8030592&1.0038\ldots\\ \hline
4000&32057728&1.0018\ldots\\ \hline
8000&1276046726&0.9969\ldots\\ \hline
16000&511437824&0.9989\ldots\\ \hline
32000&2043518720&0.9978\ldots\\ \hline
\end{tabular}
\end{center}
\end{table}
\section{Acknowledgements}
Parts of this work were undertaken while the author was visiting
the University of Hong Kong, and the Max-Planck Institute for
Mathematics in Bonn. Their hospitality and financial support is
gratefully acknowledged.
The author is also extremely grateful to Professors
Colliot-Th\'{e}l\`{e}ne and Salberger for their helpful remarks on
the proof of the Hasse Principle and Weak Approximation for the
variety (\ref{1.6}).
\begin{thebibliography}{9}
\bibitem{B} A. Balog, Linear equations in primes, {\em Mathematika}
{\bf39} (1992) 367--378
\bibitem{CCS} J.-L. Colliot-Th\'{e}l\`{e}ne, D. Coray, and J.-J. Sansuc,
Descente et principe de Hasse pour certaines vari\'{e}t\'{e}s
rationnelles, {\em J. reine angew. Math.} {\bf320} (1980) 150--191
\bibitem{CSP} J.-L. Colliot-Th\'{e}l\`{e}ne, J.-J. Sansuc, and H.P.F.
Swinnerton-Dyer, Intersections of two quadrics and Ch\^{a}telet surfaces.
I, {\em J. reine angew. Math.} {\bf373} (1987) 37--107
\bibitem{D} S. Daniel, On the divisor-sum problem for binary forms, {\em
J. reine. angew. Math.} {\bf507} (1999) 107--129
\bibitem{HT} R.R. Hall and G. Tenenbaum, {\em Divisors,} Cambridge Tracts
in Mathematics {\bf90}, Cambridge University Press, Cambridge, 1988
\bibitem{I} V.A. Iskovskih, A counterexample to the Hasse principle for
systems of two quadratic forms in five variables, {\em Mat. Zametki}
{\bf10} (1971) 253--257
\bibitem{N} M. Nair, Multiplicative functions of polynomial values in
short intervals, {\em Acta Arith.} {\bf62} (1992) 257-269
\end{thebibliography}
\bigskip
\noindent
D. R. Heath-Brown, \\
Mathematical Institute, \\
24-29 St Giles', \\
Oxford OX1 3LB, England \\
e-mail: rhb@maths.ox.ac.uk
\end{document}