\ \ \ \ \ \ \ \ -\frac{1}{2}\int_{B_{2n}(0)}\bigg{\\{}|\nabla u|^{2}+\lambda
u^{2}+\phi_{u}u^{2}-2F(u)\bigg{\\}}(x,\nabla\psi_{n})dx\hfill\\\ \ \ \ \ \ \ \
\ +\int_{B_{2n}(0)}(x,\nabla u)(\nabla\psi_{n},\nabla u)dx.\hfill\\\
\end{gathered}$

Note that

$\int_{\mathbb{R}^{2}}(\nabla\phi_{u},x)u^{2}dx=-2\int_{\mathbb{R}^{2}}(A_{1}^{2}[u]+A_{2}^{2}[u])u^{2}dx.$

Recalling $\psi_{n}\equiv 0$ on $\partial B_{2n}(0)$ together with the
definitions of the cutoff function $\psi_{n}$, then exploiting the Dominated
Convergence theorem, we obatin

$\begin{gathered}\int_{\mathbb{R}^{2}}\lambda
u^{2}dx+2\int_{\mathbb{R}^{2}}(A_{1}^{2}[u]+A_{2}^{2}[u])u^{2}dx-2\int_{\mathbb{R}^{2}}F(u)dx\hfill\\\
\ \ \ \ =\lim_{n\to\infty}\int_{B_{2n}(0)}\bigg{\\{}\lambda
u^{2}+\phi_{u}u^{2}+\frac{1}{2}(x,\nabla\phi_{u})u^{2}-2F(u)\bigg{\\}}\psi_{n}dx\hfill\\\
\ \ \ \ =-\frac{1}{2}\lim_{n\to\infty}\int_{B_{\sqrt{2}n}(0)\backslash
B_{2n}(0)}\bigg{\\{}|\nabla u|^{2}+\lambda
u^{2}+\phi_{u}u^{2}-2F(u)\bigg{\\}}(x,\nabla\psi_{n})dx\hfill\\\ \ \ \ \ \ \ \
\ +\lim_{n\to\infty}\int_{B_{\sqrt{2}n}(0)\backslash B_{2n}(0)}(x,\nabla
u)(\nabla\psi_{n},\nabla u)dx\hfill\\\ \ \ \ \ =0\hfill\\\ \end{gathered}$

showing the desired result, where the Fubini’s theorem is used in the first
equality. So, we accomplish the proof. ∎

Lemma A.2. Suppose that $f$ satisfies (1.14) and $(f_{1})$, or (1.13) and
$(f_{1})$. Let $u_{n}\to u$ in $H^{1}(\mathbb{R}^{2})$ and $u_{n}\to u$ a.e.
in $\mathbb{R}^{2}$, then

$\lim_{n\to\infty}\int_{\mathbb{R}^{2}}f(u_{n})u_{n}dx=\int_{\mathbb{R}^{2}}f(u)udx\leavevmode\nobreak\
\text{and}\lim_{n\to\infty}\int_{\mathbb{R}^{2}}F(u_{n})dx=\int_{\mathbb{R}^{2}}F(u)dx.$

###### Proof.

Since $\|u_{n}-u\|^{2}_{H^{1}(\mathbb{R}^{2})}\to 0$, adopting some very
similar calculations in the Step III in the proof of Theorem 1.2, we apply
(2.7) and (2.6) to have that

$\int_{\mathbb{R}^{2}}f(u_{n})u_{n}dx\leq
C\int_{\mathbb{R}^{2}}|u_{n}|^{\chi}dx+C\left(\int_{\mathbb{R}^{2}}|u_{n}|^{q\nu^{\prime}}dx\right)^{\frac{1}{\nu^{\prime}}}.$

Now, one can conclude that $f(u_{n})u_{n}\to f(u)u$ by using a variant of
Vitali’s Dominated Convergence theorem. The remaining part is trivial, we omit
it here. ∎

Lemma A.3. Suppose that $f$ satisfies $(f_{1})$ and $(f_{3})$, then there
holds

$f^{\prime}(s)s^{2}-5f(s)s+8F(s)>0,\leavevmode\nobreak\ \forall
s\in\mathbb{R}\backslash\\{0\\}.$

###### Proof.

Since $f(s)\equiv 0$ for all $s\in(-\infty,0]$, then it suffices to consider
$s\in(0,+\infty)$. According to $(f_{1})$ and $(f_{3})$, the function
$\bar{F}\in\mathcal{C}^{1}$ and so $\bar{F}^{\prime}(s)>0$ for all
$s\in(0,+\infty)$. Obviously, there holds

$\frac{d}{ds}\bar{F}^{\prime}(s)=\frac{f^{\prime}(s)s^{2}-5f(s)s+8F(s)}{s^{5}}>0,\leavevmode\nobreak\
\forall s\in(0,+\infty),$

which gives the desired result. ∎

Lemma A.4. For $\Psi=E\circ\zeta$, where $\zeta(u)=t_{u}u(t_{u}\cdot)$ for all
$u\in S(a)$ and $t_{u}>0$ comes from Lemma 2.5. Then, $\Psi$ is of
$\mathcal{C}^{1}$ class over $S(a)$ and

$\Psi^{\prime}(u)[v]=E^{\prime}(\zeta(u))[v_{t_{u}}]$

for any $u\in S(a)$ and $v\in\mathbb{T}_{u}$.

###### Proof.

Recalling the definition of $A_{1}$ in (1.7), given some $u,v\in
H^{1}(\mathbb{R}^{2})$ and $t>0$, we have

$\displaystyle A_{1}[u+tv](x)$
$\displaystyle=-\frac{1}{4\pi}\int_{\mathbb{R}^{2}}\frac{x_{2}-y_{2}}{|x-y|^{2}}(u+tv)^{2}(y)dy$
$\displaystyle=-A_{1}[u](x)-\frac{t}{2\pi}\int_{\mathbb{R}^{2}}\frac{x_{2}-y_{2}}{|x-y|^{2}}u(y)v(y)dy-t^{2}A_{1}[v](x)$

leading to

$\lim_{t\to
0}\frac{A_{1}[u+tv](x)-A_{1}[u](x)}{t}=-\frac{1}{2\pi}\int_{\mathbb{R}^{2}}\frac{x_{2}-y_{2}}{|x-y|^{2}}u(y)v(y)dy.$

Arguing as a very similar way, by means of (1.8), there holds,

$\lim_{t\to
0}\frac{A_{2}[u+tv](x)-A_{2}[u](x)}{t}=\frac{1}{2\pi}\int_{\mathbb{R}^{2}}\frac{x_{1}-y_{1}}{|x-y|^{2}}u(y)v(y)dy.$

From which, we apply the Fubini’s theorem jointly with (1.6) to deduce that

$\begin{gathered}\lim_{t\to
0}\frac{1}{2t}\int_{\mathbb{R}^{2}}\sum_{j=1}^{2}\left(A_{j}^{2}[u+tv]-A_{j}^{2}[u]\right)|u|^{2}dx\hfill\\\
\ \ \ \ =\lim_{t\to
0}\frac{1}{2t}\int_{\mathbb{R}^{2}}\sum_{j=1}^{2}\left(A_{j}[u+tv]+A_{j}[u])(A_{j}[u+tv]-A_{j}[u])\right)|u|^{2}dx\hfill\\\
\ \ \ \
=\int_{\mathbb{R}^{2}}A_{1}[u]\left(-\frac{1}{2\pi}\int_{\mathbb{R}^{2}}\frac{x_{2}-y_{2}}{|x-y|^{2}}u(y)v(y)dy\right)u^{2}dx\hfill\\\
\ \ \ \ \ \ \ \
+\int_{\mathbb{R}^{2}}A_{2}[u]\left(\frac{1}{2\pi}\int_{\mathbb{R}^{2}}\frac{x_{1}-y_{1}}{|x-y|^{2}}u(y)v(y)dy\right)u^{2}dx\hfill\\\
\ \ \ \
=\int_{\mathbb{R}^{2}}\left(-\frac{1}{2\pi}\int_{\mathbb{R}^{2}}\frac{x_{2}-y_{2}}{|x-y|^{2}}A_{1}[u](x)u^{2}(x)dx\right)u(y)v(y)dy\hfill\\\
\ \ \ \ \ \ \ \
+\int_{\mathbb{R}^{2}}\left(\frac{1}{2\pi}\int_{\mathbb{R}^{2}}\frac{(x_{1}-y_{1})}{|x-y|^{2}}A_{2}[u](x)u^{2}(x)dx\right)u(y)v(y)dy\hfill\\\
\ \ \ \ =\int_{\mathbb{R}^{2}}A_{0}[u](x)u(x)v(x)dx.\hfill\\\ \end{gathered}$

Due to $E(u_{t_{u}})=\max_{t>0}E(u_{t})$ for all $u\in S(a)$ by Lemma 2.5,
then

$\displaystyle\Psi(u+tv)-\Psi(u)$
$\displaystyle=E\big{(}(u+tv)_{t_{u+tv}}\big{)}-E(u_{t_{u}})\leq
E\big{(}(u+tv)_{t_{u+tv}}\big{)}-E(u_{t_{u+tv}})$
$\displaystyle=\frac{t_{u+tv}^{2}}{2}\int_{\mathbb{R}^{2}}\big{[}|\nabla(u+tv)|^{2}+(A^{2}_{1}[u+tv]+A^{2}_{2}[u+tv])|u+tv|^{2}]dx$
$\displaystyle\ \ \ \
-\frac{t_{u+tv}^{2}}{2}\int_{\mathbb{R}^{2}}\big{[}|\nabla
u|^{2}+(A_{1}^{2}[u]+A_{2}^{2}[u])|u|^{2}\big{]}dx$ $\displaystyle\ \ \ \
-t_{u+tv}^{-2}\int_{\mathbb{R}^{2}}[F(t_{u+tv}u+tt_{u+tv}v)-F(t_{u+tv}u)]dx$
$\displaystyle=\frac{t_{u+tv}^{2}}{2}\int_{\mathbb{R}^{2}}[2t\nabla u\nabla
v+t^{2}|\nabla v|^{2}+(A_{1}^{2}[u+tv]+A_{2}^{2}[u+tv])(2tuv+t^{2}|v|^{2})]dx$
$\displaystyle\ \ \ \
+\frac{t_{u+tv}^{2}}{2}\int_{\mathbb{R}^{2}}(A_{1}^{2}[u+tv]+A_{2}^{2}[u+tv]-A_{1}^{2}[u]-A_{2}^{2}[u])|u|^{2}dx$
$\displaystyle\ \ \ \
-t_{u+tv}^{-2}\int_{\mathbb{R}^{2}}f(t_{u+tv}u+\sigma_{t}tt_{u+tv}v)tt_{u+tv}vdx,$

where $\sigma_{t}\in(0,1)$ is determined by the Intermediate Value theorem.
Also, we adopt
$E\big{(}(u+tv)_{t_{u+tv}}\big{)}=\max_{t>0}E\big{(}(u+tv)_{t}\big{)}$ to get

$\displaystyle\Psi(u+tv)-\Psi(u)$
$\displaystyle=E\big{(}(u+tv)_{t_{u+tv}}\big{)}-E(u_{t_{u}})\geq
E\big{(}(u+tv)_{t_{u}}\big{)}-E(u_{t_{u}})$
$\displaystyle=\frac{t_{u}^{2}}{2}\int_{\mathbb{R}^{2}}\big{[}|\nabla(u+tv)|^{2}+(A^{2}_{1}[u+tv]+A^{2}_{2}[u+tv])|u+tv|^{2}]dx$
$\displaystyle\ \ \ \ -\frac{t_{u}^{2}}{2}\int_{\mathbb{R}^{2}}\big{[}|\nabla
u|^{2}+(A_{1}^{2}[u]+A_{2}^{2}[u])|u|^{2}\big{]}dx$ $\displaystyle\ \ \ \
-t_{u}^{-2}\int_{\mathbb{R}^{2}}[F(t_{u}u+tt_{u}v)-F(t_{u}u)]dx$
$\displaystyle=\frac{t_{u}^{2}}{2}\int_{\mathbb{R}^{2}}[2t\nabla u\nabla
v+t^{2}|\nabla v|^{2}+(A_{1}^{2}[u+tv]+A_{2}^{2}[u+tv])(2tuv+t^{2}|v|^{2})]dx$
$\displaystyle\ \ \ \
+\frac{t_{u}^{2}}{2}\int_{\mathbb{R}^{2}}(A_{1}^{2}[u+tv]+A_{2}^{2}[u+tv]-A_{1}^{2}[u]-A_{2}^{2}[u])|u|^{2}dx$
$\displaystyle\ \ \ \
-t_{u}^{-2}\int_{\mathbb{R}^{2}}f(t_{u}u+\bar{\sigma}_{t}tt_{u}v)tt_{u}vdx,$

where $\bar{\sigma}_{t}\in(0,1)$. Since the map $u+tv\to t_{u+tv}$ is
continuous by Lemma 2.5, one has

$\displaystyle\Psi^{\prime}(u)[v]$ $\displaystyle=\lim_{t\to
0}\frac{\Psi(u+tv)-\Psi(u)}{t}$
$\displaystyle=\frac{t_{u}^{2}}{2}\int_{\mathbb{R}^{2}}[2\nabla u\nabla
v+(A_{1}^{2}[u]+A_{2}^{2}[u]+A_{0}[u])2uv]dx-
t_{u}^{-2}\int_{\mathbb{R}^{2}}f(t_{u}u)t_{u}vdx$
$\displaystyle=\int_{\mathbb{R}^{2}}\big{[}\nabla u_{t_{u}}\nabla
v_{t_{u}}+(A_{1}^{2}[u_{t_{u}}]+A_{2}^{2}[u_{t_{u}}]+A_{0}[u_{t_{u}}])u_{t_{u}}v_{t_{u}}\big{]}dx-\int_{\mathbb{R}^{2}}f(u_{t_{u}})v_{t_{u}}dx$
$\displaystyle=E^{\prime}({u_{t_{u}}})[v_{t_{u}}]=E^{\prime}(\zeta(u))[v_{t_{u}}]$

which is the desired result. The proof is completed. ∎

Lemma A.5. Let $u,v\in H^{1}(\mathbb{R}^{2})$ and suppose that ${\rm
supp}{\hskip 1.42271pt}u_{t}\cap{\rm supp}{\hskip 1.42271pt}v=\emptyset$ for
all $t>0$, then

$\lim_{t\to
0^{+}}\left(\int_{\mathbb{R}^{2}}A_{j}^{2}[u_{t}+v]|u_{t}+v|^{2}dx-\int_{\mathbb{R}^{2}}A_{j}^{2}[u_{t}]|u_{t}|^{2}dx-\int_{\mathbb{R}^{2}}A_{j}^{2}[v]|v|^{2}dx\right)=0.$

###### Proof.

According to (1.7) and (1.8), for all $t>0$, there holds

$A_{j}[u_{t}+v]=A_{j}[u_{t}]+A_{j}[v],\leavevmode\nobreak\ j=1,2,$

and

$|u_{t}+v|^{2}=|u_{t}|^{2}+|v|^{2}.$

It follows from some simple calculations that

$\begin{gathered}\left|\int_{\mathbb{R}^{2}}A_{j}^{2}[u_{t}+v]|u_{t}+v|^{2}dx-\int_{\mathbb{R}^{2}}A_{j}^{2}[u_{t}]|u_{t}|^{2}dx-\int_{\mathbb{R}^{2}}A_{j}^{2}[v]|v|^{2}dx\right|\hfill\\\
\ \ \ \
=\left|\int_{\mathbb{R}^{2}}\big{(}A_{j}^{2}[u_{t}]v^{2}+A_{j}^{2}[v]u_{t}^{2}+2A_{j}[u_{t}]A_{j}[v]u_{t}^{2}+2A_{j}[u_{t}]A_{j}[v]v^{2}\big{)}dx\right|\hfill\\\
\ \ \ \
\leq|A_{j}[u_{t}]|_{\widehat{r}}^{2}|v|_{\frac{2\widehat{r}}{\widehat{r}-2}}^{2}+|A_{j}[v]|_{\widehat{r}}^{2}|u_{t}|_{\frac{2\widehat{r}}{\widehat{r}-2}}^{2}+2|A_{j}[u_{t}]|_{\widehat{r}}|A_{j}[v]|_{\widehat{r}}|u_{t}|_{\frac{2\widehat{r}}{\widehat{r}-2}}^{2}+|A_{j}[u_{t}]|_{\widehat{r}}|A_{j}[v]|_{\widehat{r}}|v|_{\frac{2\widehat{r}}{\widehat{r}-2}}^{2}\hfill\\\
\ \ \ \
=t^{2}|A_{j}[u]|_{\widehat{r}}^{2}|v|_{\frac{2\widehat{r}}{\widehat{r}-2}}^{2}+t^{\frac{4}{\widehat{r}}}|A_{j}[v]|_{\widehat{r}}^{2}|u|_{\frac{2\widehat{r}}{\widehat{r}-2}}^{2}+2t^{1+\frac{4}{\widehat{r}}}|A_{j}[u_{t}]|_{\widehat{r}}|A_{j}[v]|_{\widehat{r}}|u_{t}|_{\frac{2\widehat{r}}{\widehat{r}-2}}^{2}+t|A_{j}[u_{t}]|_{\widehat{r}}|A_{j}[v]|_{\widehat{r}}|v|_{\frac{2\widehat{r}}{\widehat{r}-2}}^{2}\hfill\\\
\ \ \ \ \to 0\hfill\\\ \end{gathered}$

as $t\to 0^{+}$, where we exploited Lemma 2.2 with $\widehat{r}>2$. The proof
is completed. ∎

Conflict of interest. The authors have no competing interests to declare that
are relevant to the content of this article.

## References

  * [1] Adimurthi, S.L. Yadava, Multiplicity results for semilinear elliptic equations in bounded domain of $\mathbb{R}^{2}$ involving critical exponent, Ann. Scuola Norm. Sup. Pisa Cl. Sci., 17 (1990), 481–504.
  * [2] Adimurthi, Y. Yang, An interpolation of Hardy inequality and Trudinger-Moser inequality in $\mathbb{R}^{N}$ and its applications, Int. Math. Res. Not. IMRN, 13 (2010), 2394–2426.
  * [3] C.O. Alves, C. Ji, O.H. Miyagaki, Normalized solutions for a Schrödinger equation with critical growth in $\mathbb{R}^{N}$, Calc. Var. Partial Differential Equations, 61 (2022), no. 1, Paper No. 18, 24 pp.
  * [4] C.O. Alves, L. Shen, On existence of solutions for some classes of elliptic problems with supercritical exponential growth, accepted by Math. Z., (2023).
  * [5] C.O. Alves, L. Shen, On a class of strongly indefinite Schrödinger equations with Stein-Weiss convolution parts and supercritical exponential growth in $\mathbb{R}^{2}$, submitted.
  * [6] C.O. Alves, L. Shen, Normalized solutions for the Schrödinger equations with Stein-Weiss convolution parts in $\mathbb{R}^{2}$: the supercritical case, submitted.
  * [7] A. Azzollini, A. Pomponio, Positive energy static solutions for the Chern-Simons-Schrödinger system under a large-distance fall-off requirement on the gauge potentials, Calc. Var. Partial Differential Equations, 60 (2021), no. 5, Paper No. 165, 30 pp.
  * [8] T. Bartsch, N. Soave, A natural constraint approach to normalized solutions of nonlinear Schrödinger equations and systems, J. Funct. Anal., 272 (2017), 4998–5037.
  * [9] T. Bartsch, N. Soave, Multiple normalized solutions for a competing system of Schrödinger equations, Calc. Var. Partial Differential Equations, 58 (2019), no. 1, Paper No. 22, 24 pp.
  * [10] H. Brézis, Functional analysis, Sobolev spaces and partial differential equations, New York: Springer, 2011.
  * [11] J. Byeon, H. Huh, J. Seok, Standing waves of nonlinear Schrödinger equations with the gauge field, J. Funct. Anal., 263 (2012), 1575–1608.
  * [12] D. Cao, Nontrivial solution of semilinear elliptic equation with critical exponent in $\mathbb{R}^{2}$, Commun. Partial Differential Equations, 17 (1992), 407–435.
  * [13] K.C. Chang, Methods in nonlinear analysis, _Springer_ , 2003.
  * [14] S. Chen, B. Zhang, X. Tang, Existence and concentration of semiclassical ground state solutions for the generalized Chern-Simons-Schrödinger system in $H^{1}(\mathbb{R}^{2})$, Nonlinear Anal., 185 (2019), 68–96.
  * [15] D.G. de Figueiredo, O.H. Miyagaki, B. Ruf, Elliptic equations in $\mathbb{R}^{2}$ with nonlinearities in the critical growth range, Calc. Var. Partial Differential Equations, 3 (1995), 139–153.
  * [16] M. de Souza, J.M. do Ó,  A sharp Trudinger-Moser type inequality in $\mathbb{R}^{2}$,  Trans. Ame. Math. Soc., 366 (2014), 4513–4549.
  * [17] Y. Deng, S. Peng, W. Shuai, Nodal standing waves for a gauged nonlinear Schrödinger equation in $\mathbb{R}^{2}$, J. Differential Equations, 264 (2018), no. 6, 4006–4035.
  * [18] G. Dunne, Self-Dual Chern-Simons Theories, Springer, 1995.
  * [19] B.D. Esry, C.H. Greene, Jr., J. P. Burke, J.L. Bohn, Hartree-Fock theory for double condensates, Phys. Rev. Lett., 78 (1997) 3594–3597.
  * [20] D.J. Frantzeskakis, Dark solitons in atomic Bose Einstein condensates: From theory to experiments, J. Phys. A: Math. Theor., 43, (2010) 213001\.
  * [21] N. Ghoussoub, Duality and Perturbation Methods in Critical Point Theory, volume 107 of Cambridge Tracts in Mathematics. _Cambridge University Press_ , Cambridge, 1993.
  * [22] T. Gou, Z. Zhang, Normalized solutions to the Chern-Simons-Schrödinger system, J. Funct. Anal., 280 (2021), no. 5, Paper No. 108894, 65 pp.
  * [23] H. Huh, Blow-up solutions of the Chern-Simons-Schrödinger equations, Nonlinearity, 22 (2009), 967–974.
  * [24] H. Huh, Standing waves of the Schrödinger equation coupled with the Chern-Simons gauge field. J. Math. Phys., 53 (2012), 063702.
  * [25] R. Jackiw, S. Pi, Classical and quantal nonrelativistic Chern-Simons theory, Phys. Rev. D, 42 (1990), 3500–3513.
  * [26] R. Jackiw, S. Pi, Soliton solutions to the gauged nonlinear Schrödinger equation on the plane, Phys. Rev. Lett. 64 (1990), 2969–2972.
  * [27] R. Jackiw, S. Pi, Self-dual Chern-Simons solitons, Progr. Theoret. Phys. Suppl. 107 (1992), 1–40.
  * [28] L. Jeanjean, Existence of solutions with prescribed norm for semilinear elliptic equations, Nonlinear Anal., 28 (1997), 1633–1659.
  * [29] L. Jeanjean, S. Lu, Nonradial normalized solutions for nonlinear scalar field equations, Nonlinearity, 32 (2019), no. 12, 4942–4966.
  * [30] L. Jeanjean, S. Lu, A mass supercritical problem revisited, Calc. Var. Partial Differential Equations, 59 (2020), no. 5, Paper No. 174, 43 pp.
  * [31] L. Jeanjean, S. Lu, Normalized solutions with positive energies for a coercive problem and application to the cubic-quintic nonlinear Schro dinger equation, Math. Models Methods Appl. Sci., 32 (2022), no. 8, 1557–1588.
  * [32] Y. Jiang, T. Chen, J. Zhang, M. Squassina, N. Almousa, Ground states of Schrödinger systems with the Chern-Simons gauge fields, Adv. Nonlinear Stud. 23 (2023), no. 1, Paper No. 20230086, 16 pp.
  * [33] J. Kang, C. Tang, Existence of nontrivial solutions to Chern-Simons-Schrödinger system with indefinite potential, Discrete Contin. Dyn. Syst. Ser. S, 14 (2021), no. 6, 1931–1944.
  * [34] N. Lam, G. Lu, Existence and multiplicity of solutions to equations of $n$-Laplacian type with critical exponential growth in $\mathbb{R}^{n}$, J. Funct. Anal., 262 2012), 1132–1165.
  * [35] G. Li, X. Luo, Normalized solutions for the Chern-Simons-Schrödinger equation in $\mathbb{R}^{2}$, Ann. Acad. Sci. Fenn. Math., 42 (2017), no. 1, 405–428.
  * [36] L. Li, J.F. Yang, J.G. Yang, Solutions to Chern-Simons-Schrödinger systems with external potential, Discrete Contin. Dyn. Syst. Ser. S, 14 (2021), no. 6, 1967–1981.
  * [37] X. Li, Existence of normalized ground states for the Sobolev critical Schrödinger equation with combined nonlinearities, Calc. Var. Partial Differential Equations, 60 (2021), 1–14.
  * [38] W. Liang, C. Zhai, Existence of bound state solutions for the generalized Chern-Simons-Schrödinger system in $H^{1}(\mathbb{R}^{2})$, Appl. Math. Lett., 100 (2020), 106028, 7 pp.
  * [39] E.H. Lieb, M. Loss, Analysis: Graduate Studies in Mathematics. AMS, Providence (2001).
  * [40] B. Liu, P. Smith, Global well posedness of the equivariant Chern-Simons-Schrödinger equation, Rev. Mat. Iberoam., 32 (2016), 751–794.
  * [41] B. Liu, P. Smith, D. Tataru, Local wellposedness of Chern-Simons-Schrödinger, Int. Math. Res. Not. IMRN, 23 (2014), 6341–6398.
  * [42] Z. Liu, Z. Ouyang, J. Zhang, Existence and multiplicity of sign-changing standing waves for a gauged nonlinear Schrödinger equation in $\mathbb{R}^{2}$, Nonlinearity, 32 (2019), no. 8, 3082–3111.
  * [43] X. Luo, Multiple normalized solutions for a planar gauged nonlinear Schrödinger equation, Z. Angew. Math. Phys., 69 (2018), no. 3, Paper No. 58, 17 pp.
  * [44] B. Malomed, Multi-Component Bose-Einstein Condensates: Theory, Emergent Nonlinear Phenomena in Bose-Einstein Condensation, Springer-Verlag, Berlin, 2008.
  * [45] A. Pomponio, D. Ruiz, A variational analysis of a gauged nonlinear Schrodinger equation, J. Eur. Math. Soc. (JEMS), 17 (2015), no. 6, 1463–1486.
  * [46] A. Pomponio, L. Shen, X. Zeng, Y. Zhang, Generalized Chern-Simons-Schrödinger system with sign-changing steep potential well: critical and subcritical exponential case, J. Geom. Anal., 33 (2023), no. 6, Paper No. 185, 34 pp.
  * [47] L. Shen, Ground state solutions for a class of gauged Schrödinger equations with subcritical and critical exponential growth, Math. Methods Appl. Sci., 43 (2020), no. 2, 536–551.
  * [48] L. Shen, Zero-mass gauged Schrödinger equations with supercritical exponential growth, submitted.
  * [49] L. Shen, M. Squassina, M. Yang, Critical gauged Schrödinger equations in $\mathbb{R}^{2}$ with vanishing potentials, Discrete Contin. Dyn. Syst. A, 42 (2022), no. 9, 4415–4438.
  * [50] N. Soave, Normalized ground states for the NLS equation with combined nonlinearities, J. Differential Equations, 269 (2020), no. 9, 6941-6987.
  * [51] N. Soave, Normalized ground states for the NLS equation with combined nonlinearities: the Sobolev critical case, J. Funct. Anal., 279 (2020), no. 6, 108610, 43 pp.
  * [52] A. Szulkin, T. Weth, Ground state solutions for some indefinite variational problems, J. Funct. Anal., 257 (2009), 3802–3822.
  * [53] Y. Wan, J. Tan, The existence of nontrivial solutions to Chern-Simons-Schrödinger systems, Discrete Contin. Dyn. Syst. A, 37 (2017), no. 5, 2765–2786.
  * [54] J. Wei, Y. Wu, Normalized solutions for Schrödinger equations with critical Sobolev exponent and mixed nonlinearities, J. Funct. Anal., 283 (2022), 1–46.
  * [55] M. Willem, Minimax Theorems, Progress in Nonlinear Differential Equations and their Applications, 24, Birkhäuser Boston Inc., Boston, MA, 1996\.
  * [56] S. Yao, H. Chen, J. Sun, Two normalized solutions for the Chern-Simons-Schrödinger system with exponential critical growth, J. Geom. Anal., 33 (2023), no. 3, Paper No. 91, 26 pp.
  * [57] S. Yao, H. Chen, J. Sun, Normalized solutions to the Chern-Simons-Schrödinger system under the nonlinear combined effect, Sci. China Math., 66 (2023), no. 9, 2057–2080.
  * [58] J. Yuan, Multiple normalized solutions of Chern-Simons-Schrödinger system, NoDEA Nonlinear Differential Equations Appl., 22 (2015), no. 6, 1801–1816.
  * [59] S. Yuan, X. Tang, S. Chen, Normalized solutions of Chern-Simons-Schrödinger equations with exponential critical growth, J. Math. Anal. Appl., 516 (2022), no. 2, Paper No. 126523, 22 pp.


# On the number of binary quadratic forms having discriminant $1-4p$, $p$
prime

Alison Beth Miller  Mathematical Reviews
416 Fourth St.
Ann Arbor, MI 48103<EMAIL_ADDRESS>and  Stanley Yao Xiao  Department of
Mathematics
University of Toronto
Bahen Centre
40 St. George Street, Room 6290
Toronto, Ontario, Canada
M5S 2E4<EMAIL_ADDRESS>
###### Abstract.

In this paper we obtain an asymptotic formula for the number of
$\operatorname{SL}_{2}({\mathbb{Z}})$-equivalence classes of positive definite
binary quadratic forms over ${\mathbb{Z}}$ having bounded discriminant
$\Delta=1-4p$, with $p$ a prime. This extends work of the first named author
and has an application in counting simple $(4a+1)$-knots of genus one.

##  1\. Introduction

In [9], the first named author gave an account of a connection between simple
$(4a+1)$-knots of genus $1$ and Alexander polynomial

(1.1) $\Delta_{m}(t)=mt^{2}-(2m-1)t+m,m\in{\mathbb{Z}},$

and binary quadratic forms of discriminant $1-4m$ (note that this is also the
discriminant of the quadratic $\Delta_{m}$). In particular, there is a
surjective map from such binary quadratic forms to such knots, which is
injective exactly when $m=\pm p$ is a prime or negative prime, and otherwise
is expected to have large kernel. As a consequence, the first named author
gave interesting heuristics that shew knots with Alexander polynomial
$\Delta_{p}(t)$ with $p$ prime should dominate the total count of such knots
up to isomorphism. Determining the size of the heuristically dominant term
leads to the following question, which is purely about definite binary
quadratic forms:

Question: How many $\operatorname{SL}_{2}({\mathbb{Z}})$-classes of integral,
positive definite binary quadratic forms are there whose discriminant is of
the form $1-4p$ with $p$ prime, and bounded by $X$?

Note that here the binary quadratic forms are allowed to be imprimitive; there
is no obvious topological interpretation for primitivity of the quadratic form
associated to a knot. If we write $H(D)$ for the total number of
$\operatorname{SL}_{2}$-equivalence classes of positive definite binary
quadratic forms of discriminant $D$ (this is almost the same as the Hurwitz
class number, except that we are not weighting the forms that have
automorphisms, and has the same asymptotics), our question asks: what is
$\sum_{p\leq X}H(1-4p)$?

The previous paper [9] conjectured that the answer should be asymptotic to
$X^{3/2}/\log X$, based on the heuristic assumption that class numbers
$H(1-4p)$, $p$ prime, have the same statistical behaviour as the class numbers
$H(1-4m)$ for all $m$. It applied a sieve to prove an upper bound of the form
$O(X^{3/2}/\log X)$, without determining the constant explicitly. In this
paper we give an exact asymptotic for the counting problem.

######  Theorem 1.1.

We have the asymptotic formula

$\sum_{p\leq
X}H(1-4p)=C_{\operatorname{Art}}\cdot\frac{2\pi}{9}\cdot\frac{X^{3/2}}{\log
X}+O\left(\frac{X^{3/2}}{(\log X)^{2}}\right).$

Here the constant $C_{\operatorname{Art}}$ is _Artin’s constant_ , given by
the Euler product

$C_{\operatorname{Art}}=\prod_{\ell\geq
2}\left(1-\frac{1}{\ell(\ell-1)}\right).$

This shows that the heuristic assumption in [9] is not quite right. Comparing
with the asymptotic $\sum_{m\leq X}H(1-4m)=\frac{2\pi}{9}X^{3/2}$, we see that
the class numbers $H(1-4p)$ are smaller on average than the class numbers
$H(1-4m)$ by a factor of Artin’s constant $C_{\operatorname{Art}}$.

Artin’s constant originally arose in the context of Artin’s conjecture on
primitive roots [6], namely predicting the proportion of primes $\ell$ for
which a given integer $a\neq\pm 1$ is a primitive root mod $\ell$ (this
proportion is expected to be independent of $a$). We do not know of a direct
connection between Theorem 1.1 and Artin’s conjecture.

Similar problems were considered by Friedlander and Iwaniec in [5], for the
case of discriminants of the form $-4p$, and by Nagoshi in [11] for
discriminants of the form $-p\equiv 1\pmod{4}$ (Nagoshi notably computed all
moments). Our second proof, using the analytic class number formula, is
inspired by these proofs. However, in implementing this strategy we encounter
additional complications: where Friedlander-Iwaniec and Nagoshi obtain a
single main term, we end up with infinitely many main terms, which we must sum
to obtain the final answer. These come from two sources: both because we are
including non-primitive forms in our count, and because numbers of the form
$1-4p$, unlike primes, are slightly more likely to be quadratic residues
modulo a prime $\ell$ than they are to be residues.

We expand on this point. While in previous works restricting to primes did not
affect the average size of the class number, in our case it does, producing a
factor of $C_{\operatorname{Art}}$ that does not appear in the total count of
all binary quadratic forms.

###  1.1. Outline of the proofs

We will in fact give two proofs of the main theorem, one where we count in the
fundamental domain of $\operatorname{SL}_{2}({\mathbb{Z}})$-classes of
positive definite binary quadratic forms having absolute discriminant bounded
by $X$, and one which computes using the class number formula. The reason for
this redundancy is that the two approaches have distinct advantages: the
former requires an _explicit_ equidistribution result for roots of quadratic
polynomials and gives us an opportunity to record such a result in the
literature. In fact the result is easily deduced from the work of Hooley [6].
The latter approach has the advantage that it is computationally less
intensive.

The first proof goes on by counting integral points in the classical Gauss
fundamental domain directly. The trick is to write the discriminant equation

$4ac-b^{2}=4p-1$

as

$ac=k^{2}+k+p,$

where $b=2k+1$. Thus one reduces the problem to estimating a divisor sum of
the shape

$\sum_{p\leq X}\sum_{k}d(k^{2}+k+p).$

Such a sum is well within the purview of modern analytic number theory; see
for example [7] for a recent example. However, the issue is that the region we
are counting in is somewhat irregular in shape and so some thought is required
to write down sums that can be evaluated precisely.

The key idea to do this is to note that

$\\#\\{k\pmod{a}:a|k^{2}+k+p\\}=\sum_{m|a}\left(\frac{1-4p}{m}\right).$

This reduces our counting problem to evaluating sums of the shape

$\sum_{p}\sum_{a}\sum_{m|a}\left(\frac{1-4p}{m}\right).$

Unfortunately, sometimes we do not sum over a complete set of residues mod
$a$, so we will require an equidistribution result. Such equidistribution
results are well-known; see for example the seminal work of Hooley [6]. We
require an explicit error term with good dependence on $p$, which does not
appear to be in the literature. Fortunately such an estimate follows easily
from Hooley’s argument in [6], and we have recorded it here as Proposition
2.5.

The rest of the argument relies on applying oscillation lemmas of sums
involving Jacobi symbols and the Siegel-Walfisz theorem.

Our second proof counts binary quadratic forms with the analytic class number
formula

$h(D)=\frac{1}{\pi}L(1,\chi_{D})|D|^{1/2}$

for negative discriminant $D$. This formula applies to non-maximal orders, but
here $h(D)$ only counts the primitive binary quadratic forms of discriminant
$D$. Since we want to count all binary quadratic forms, our first step is to
write our sum $Q(X)=\sum_{d\geq 1}Q_{d}(X)$, where $Q_{d}(X)$ counts only the
forms $ax^{2}+bxy+cy^{2}$ with content $\gcd(a,b,c)=d$. To estimate
$Q_{d}(X)$, we first estimate the related quantity
$T_{d}(X)=\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid
1-4p\end{subarray}}L(1,\chi((1-4p)/d^{2}))$, and then apply Abel summation to
the sum over $p$.

This reduces our problem to bounding

$T_{d}(X)=\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid
1-4p\end{subarray}}L(1,\chi((1-4p)/d^{2}))=\sum_{{\begin{subarray}{c}p\leq
X\\\ d^{2}\mid 1-4p\end{subarray}}}\sum_{n\geq
1}\frac{1}{n}\genfrac{(}{)}{}{}{(1-4p)/d^{2}}{n}.$

As in the first method, we have a double sum of quadratic residue symbols,
though now it is weighted, and the strategies we apply are similar to the
first approach. We are able to cut off the sums in the $L$-functions at $n\sim
X^{1/2+\epsilon}$. We then show that the range $(\log
X)^{B}<n<X^{1/2+\epsilon}$ yields an error term by dividing it into dyadic
intervals and using double oscillation lemma on each. Finally, for $n\leq(\log
X)^{B}$ we use Siegel-Walfisz to estimate the sum over $p$: this sum is
generally nonzero, so we then have to combine our Siegel-Walfisz main terms
into one big main term.

###  1.2. Motivation from and application to knot theory

This line of research was originally motivated by a question related to knot
theory. We sketch the appropriate background (See section 2 of [9] for more
details.) and state the implications of our results in terms of knots and knot
invariants.

Roughly speaking, an $n$-knot is a “nicely” embedded copy of $S^{n}$ in
$S^{n+2}$, up to topological equivalence. (Here it matters that we keep track
of the orientations both on $S^{n}$ and $S^{n+2}$.) The most well-known case
is that of $n=1$, where the classification of knots and study of their
invariants is an extremely rich and active field. In higher dimensions, the
study of all knots only gets more complicated, but certain special families of
knots are well understood, in particular the simple $n$-knots, which are those
for which the first $\lfloor\frac{n}{2}\rfloor$ homotopy groups of the knot
complement are “as trivial as possible” (explicitly, $\pi_{1}$ is isomorphic
to ${\mathbb{Z}}$ and $\pi_{i}$ is trivial for $2\leq i\leq\frac{n}{2}$).

For $n=5$ and $n\geq 7$, simple $n$-knots have been completely classified in
terms of algebraic data: notably, this classification only depends on the
dimension $n$ modulo $4$. Simple knots have a fundamental invariant, the
Alexander polynomial, and Bayer and Michel proved that for a squarefree
polynomial $\Delta\in{\mathbb{Z}}[t]$, there are only finitely many simple
$n$-knots with Alexander polynomial $\Delta$.

The paper [9] studied simple $(4a+1)$-knots of genus $1$, for fixed $a\geq 1$
(as noted above the classification does not depend on $a$). These are exactly
the simple $(4a+1)$-knots with Alexander polynomial
$\Delta_{m}=mt^{2}+(1-2m)t+m$ for some nonzero integer $m$. Using the
algebraic classification of simple $(4a+1)$-knots, in [9] the first named
author showed that:

######  Theorem 1.2 ([9] Theorem 2.5 (vi), Corollary 2.13).

Simple $(4a+1)$-knots with Alexander polynomial $\Delta_{m}$ are in bijection
with $\operatorname{SL}_{2}({\mathbb{Z}}[1/m])$-equivalence classes of binary
quadratic forms over ${\mathbb{Z}}[1/m]$ of discriminant $1-4m$ .

Furthermore, when $m=p$ is prime,
$\operatorname{SL}_{2}({\mathbb{Z}}[1/p])$-equivalence classes of binary
quadratic forms of discriminant $1-4m$ over ${\mathbb{Z}}[1/m]$ are naturally
identified with $\operatorname{SL}_{2}({\mathbb{Z}})$-equivalence classes of
binary quardatic forms over ${\mathbb{Z}}$ of discriminant $1-4p$.

Combining this with our Theorem 1.1, and including a factor of $2$ as we are
allowing both positive and negative definite forms,

######  Corollary 1.3.

The total number of simple $(4a+1)$-knots of genus $1$ with Alexander
polynomial $pt^{2}+(1-2p)t+p$ for $p\in[1,X]$ prime is $\sim
C_{\operatorname{Art}}\frac{4\pi}{9}X^{3/2}/(\log X)$.

The heuristics of [9] indicate that most simple knots of genus $1$ (ordered by
the height of the Alexander polynomial) should have Alexander polynomial of
this form. That is, the total number of $(4a+1)$-knots of genus $1$ with
Alexander polynomial $mt^{2}+(1-2m)t+m$ for $m\in[-X,X]$ should also be
$C_{\operatorname{Art}}\frac{4\pi}{9}X^{3/2}/(\log X)+O(X^{3/2}/\log(X))$. It
is an interesting question for future research to see if this can be proven:
showing it will require getting some control on the sizes of the oriented
class groups of the rings
${\mathbb{Z}}\left[\frac{1}{m},\frac{1+\sqrt{1-4m}}{2}\right]$, which is more
complicated when $m$ is not prime.

Finally, we note that the algebraic invariants (the Alexander module and
Blanchfield pairing, or equivalently the Seifert matrix) used to classify
$(4a+1)$-knots for $a\geq 1$ are also useful in the low-dimensional case
$a=0$, though they are no longer complete invariants of the knot, and miss a
lot of knot-theoretic information. Indeed, $(4a+1)$-knots for fixed $a\geq 1$
are in bijection with $S$-equivalence classes of Seifert forms [9][Theorem
2.4].

This allows us to restate the previous corollary in terms of objects of
interest to low-dimensional topologists:

######  Corollary 1.4.

The number of $S$-equivalence classes of $2\times 2$ Seifert matrices $P$ with
Alexander polynomial $\det(tP-P^{t})=pt^{2}+(1-2p)t+p$ for $p\in[1,X]$ prime
is $\sim C_{\operatorname{Art}}\frac{42\pi}{9}X^{3/2}/(\log X)$.

##  2\. Preliminary lemmas

In this section we state several technical lemmas and propositions which will
be needed for our proofs of Theorem 1.1. Some of the statements that follow
will be classical and well-known, while some are new results. In particular,
we believe that Proposition 2.5 and Lemma 2.2 are new. We give proofs for
these results in this section.

###  2.1. An unrestricted version of the double oscillation lemma

We begin with the statement of the following well-known lemma:

######  Lemma 2.1 (Double Oscillation Lemma).

Let $\\{\alpha_{n}\\},\\{\beta_{m}\\}$ be two sequences of complex numbers
with each term having absolute value bounded by $1$. Let $M,N$ be positive
real numbers. Then we have

$\sum_{m\leq M}\sum_{n\leq
N}\alpha_{m}\beta_{n}\mu^{2}(2m)\mu^{2}(2n)\genfrac{(}{)}{}{}{m}{n}$ $\ll
MN\min\left\\{\left(M^{-1/2}+(N/M)^{-1/2}\right),\left(N^{-1/2}+(M/N)^{-1/2}\right)\right\\}$

and for every $\varepsilon>0$,

$\sum_{m\leq M}\sum_{n\leq
N}\alpha_{m}\beta_{n}\mu^{2}(2m)\mu^{2}(2n)\genfrac{(}{)}{}{}{m}{n}\ll_{\varepsilon}MN\left(M^{-1/2}+N^{-1/2}\right)(MN)^{\varepsilon}$

Lemma 2.1 essentially follows from the Polya-Vinogradov inequality. There are
several instances in this paper where Lemma 2.1 is needed. However, the
sharpest form of Lemma 2.1 requires that the sum is supported on _odd
squarefree numbers_. We observe here that applying a squarefree sieve allows
us to remove this restriction at the cost of a logarithmic factor, which is
often an acceptable loss. We thus obtain the following version of Lemma 2.1:

######  Lemma 2.2 (Unrestricted Double Oscillation Lemma).

Let $\\{\alpha_{n}\\},\\{\beta_{m}\\}$ be two sequences of complex numbers
with each term having absolute value bounded by $1$. Let $M,N$ be positive
real numbers. Then we have

$\sum_{m\leq M}\sum_{n\leq N}\alpha_{m}\beta_{n}\genfrac{(}{)}{}{}{m}{n}$ $\ll
MN(\log M+\log
N)\min\left\\{\left(M^{-1/2}+(N/M)^{-1/2}\right),\left(N^{-1/2}+(M/N)^{-1/2}\right)\right\\}$

###### Proof of Lemma 3.1.

We first note that, with minor modifications to the constant, we can easily
get rid of the restriction that $m$ and $n$ must be odd, since every even
squarefree number is twice an odd squarefree number. Getting rid of the
squarefree restriction takes more work.

By symmetry, it is enough to show that our left hand side
$\Xi(M,N)=\sum_{m\leq M}\sum_{n\leq N}\alpha_{m}\beta_{n}$ satisfies
$\Xi_{(}M,N)\ll(M^{1/2}N+M^{3/2}N^{1/2})(\log M+\log N)$.

We then decompose $\Xi(M,N)$ as

$\Xi(M,N)=\sum_{k\leq\sqrt{M}}\sum_{\ell\leq\sqrt{N}}\Xi_{k,\ell}(M,N)$

where

$\Xi_{k,\ell}(M,N)=\sum_{m^{\prime}\leq k^{-2}M\text{
squarefree}}\sum_{n^{\prime}\leq\ell^{-2}M\text{
squarefree}}\alpha_{k^{2}m^{\prime}}\beta_{\ell^{2}n^{\prime}}\genfrac{(}{)}{}{}{k^{2}m^{\prime}}{\ell^{2}n^{\prime}}.$

is the total contribution from all pairs $(m,n)$ of the form
$(k^{2}m^{\prime},\ell^{2}n^{\prime})$ with $m^{\prime}$ and $n^{\prime}$
squarefree. Since $m^{\prime}$ and $n^{\prime}$ are now restricted to be
squarefree, we can apply double cancellation to obtain

$\Xi_{k,\ell}(M,N)\ll(k^{-1}\ell^{-2}M^{1/2}N+\ell^{-3}k^{-1}M^{3/2}N^{1/2}).$

Summing over $k,\ell$ gives the bound

$\Xi(M,N)\ll\sum_{k\leq\sqrt{M}}\sum_{\ell\leq\sqrt{N}}(k^{-1}\ell^{-2}M^{1/2}N+\ell^{-3}k^{-1}M^{3/2}N^{1/2})\asymp\log(M)M^{1/2}N+\log(N)M^{3/2}N^{1/2},$

which is of the size needed. ∎

###  2.2. A Siegel-Walfisz-type lemma

As is well-known by now, in problems involving summations over Jacobi symbols
where both arguments are variable, it is often necessary to consider the sum
over just one variable. In such cases Lemma 2.1 does not apply, and so we will
require the following result which is derived from the Siegel-Walfisz theorem:

######  Lemma 2.3 (Siegel-Walfisz).

For every $q\geq 2$ and for every primitive character $\chi\pmod{q}$, we have
that for any $A>0$ the estimate

$\sum_{Y\leq p\leq X}\chi(p)\ll_{A}\sqrt{q}X(\log X)^{-A}$

uniformly for $X\geq Y\geq 2$.

Although Lemma 2.3 applies to character sums over primes evaluated at prime
arguments, we can easily modify the lemma to the sum $\sum_{Y\leq p\leq
X}\chi(1-4p)$ when $\chi$ has odd conductor $m$ say. Therefore $4$ is
invertible mod $m$ and the map $x\mapsto 1-4x$ is invertible mod $m$.

However, in the sum $\sum_{Y<p<X}\chi_{m}(p)$ we note that for $Y>m$ the prime
$p$ is never divisible by $m$, whence the $0$-class never appears.
Correspondingly, the $1\pmod{m}$ class never appears for $1-4p$ since that
would imply $m|p$, as $m$ is odd.

If $m=\ell$ is an odd prime, then the map $L:x\mapsto 1-4x$ sends the set of
primitive residues $\\{1,\cdots,\ell-1\\}$ to $\\{0,2,\cdots,\ell-1\\}$.
Indeed, there are $(p-1)/2$ residues $k$ each such that
$\left(\frac{k}{\ell}\right)=\pm 1$, and the image of the map contains
$(p-1)/2$ residues giving $-1$ and $(p-3)/2$ residues giving $+1$, since
$1\pmod{\ell}$ is omitted. Thus there is one more $-1$ than $+1$.

However if $m=\ell_{1}\ell_{2}$, then we see that there are

$(\ell_{1}-1)(\ell_{2}-1)/4+(\ell_{1}-3)(\ell_{2}-3)/4$

residues giving $+1$ in the image of $L$, and

$(\ell_{1}-1)(\ell_{2}-3)/4+(\ell_{1}-3)(\ell_{2}-1)/4$

giving $-1$. Expanding, we see that

$\displaystyle(\ell_{1}-1)(\ell_{2}-1)+(\ell_{1}-3)(\ell_{2}-3)-(\ell_{1}-1)(\ell_{2}-3)-(\ell_{1}-3)(\ell_{2}-1)$
$\displaystyle=\ell_{1}\ell_{2}-\ell_{1}-\ell_{2}+1+\ell_{1}\ell_{2}-3\ell_{1}-3\ell_{2}+9-\ell_{1}\ell_{2}+3\ell_{1}+\ell_{2}-3-\ell_{1}\ell_{2}+3\ell_{2}+\ell_{1}-3$
$\displaystyle=4,$

so there will be one more $+1$ than $-1$.

The pattern continues, or to put it more formally: the function
$m\mapsto\sum_{a\in({\mathbb{Z}}/m)^{*}}\chi_{m}(1-4a)$ is multiplicative on
odd squarefree $m$ by the Chinese remainder theorem. We deduce the follow
following lemma:

######  Lemma 2.4.

Let $m>1$ be an odd, square-free integer and let $\chi$ be a primitive
character modulo $m$. Then for any $A>0$ we have the estimate

$\sum_{Y\leq p\leq
X}\chi(1-4p)=\frac{\mu(m)}{\phi(m)}\left(\operatorname{Li}(X)-\operatorname{Li}(Y)\right)+O_{A}\left(\sqrt{m}X(\log
X)^{-A}\right)$

uniformly for $X\geq Y\geq 2$.

We will require the following result on the equidistribution of roots of a
quadratic congruence:

######  Proposition 2.5.

Let $f$ be an irreducible quadratic polynomial, and let
$0\leq\alpha\leq\beta\leq 1$ be real numbers. Put

(2.1) $S_{f}(\alpha,\beta;n)=\\#\\{v\in\\{0,\ldots,n-1\\}:f(v)\equiv
0\pmod{n},\alpha n\leq v\leq\beta n\\}.$

Then

$\sum_{n\leq X}S_{f}(\alpha,\beta;n)=(\beta-\alpha)\sum_{n\leq
X}S_{f}(0,1;n)+O\left(X^{8/9}(\log X)^{3}\right).$

The novelty of Proposition 2.5 lies in the explicit error term, the main
asymptotic being well-known. The asymptotic is derived as a consequence of
examining explicit estimates in [6] and then applying a method of Erdös-Turan,
as recorded in Montgomery’s book [10].

###  2.3. Proof of Proposition 2.5

The proof begins with the following set-up. Let
$f(x)=ax^{2}+bx+c\in{\mathbb{Z}}[x]$ be a positive definite, primitive
quadratic polynomial. For a given positive integer $n$ let
${\mathcal{S}}_{f}(\alpha,\beta;n)$ be as in (2.1), and put

$\rho_{h}(n)=\sum_{f(v)\equiv 0\pmod{n}}e\left(\frac{hv}{n}\right)$

for $h\in{\mathbb{Z}}$, where as usual $e(s)=\exp(2\pi is)$. Put

$D_{f}(\alpha,\beta;X)=\sum_{n\leq
X}S_{f}(\alpha,\beta;n)-(\beta-\alpha)\sum_{n\leq X}S_{f}(0,1;n)$

and define the _discrepancy_ to be

(2.2) $D_{f}(X)=\sup_{0\leq\alpha\leq\beta\leq 1}|D_{f}(\alpha,\beta;X)|.$

We then have the following result due to Erdös and Turan (see Chapter 1 of
[10] for a reference):

######  Lemma 2.6.

Let notation be as above. For all positive integers $N$ the discrepancy
$D_{f}(X)$ satisfies the bound

(2.3)
$D_{f}(X)\leq\frac{X}{N+1}+3\sum_{h=1}^{N}\frac{1}{h}\left\lvert\sum_{n\leq
X}\rho_{h}(n)\right\rvert$

Lemma 2.6 thus reduces the question of bounding $D_{f}(\alpha,\beta;X)$ by
bounding the term

(2.4) $\left|\sum_{n\leq X}\rho_{h}(n)\right\rvert.$

It is known that (2.4) satisfies the bound $O_{f,h}\left(X^{2/3}(\log
X)^{2}\right)$, but for our purposes we need to make the dependence on $f$ and
$h$ explicit. To do so we must settle with an older approach, due to Hooley
[6], where this can be done, at the cost of a worse exponent of $3/4$ for $X$.

We give a brief description of Hooley’s approach in [6], being careful to
extract the dependence on $h$ and on $f$. One begins by observing that the
solutions to the congruence

(2.5) $f(x)\equiv 0\pmod{n}$

are in bijection with the the number of representations of $n$ by
$\operatorname{SL}_{2}({\mathbb{Z}})$-inequivalent binary quadratic forms $g$
having the same discriminant as $f$. Indeed, for

$g(x,y)=a_{2}x^{2}+a_{1}xy+a_{0}y^{2},\Delta(g)=\Delta(f)$

It is standard (see [1] for a modern reference) that the fractions $v/n$
corresponding to solutions to the congruence (2.5) are given by

(2.6) $\frac{v}{n}=\frac{r}{\alpha
t}-\frac{a_{1}t+2a_{0}u+bt}{2atg(t,u)}\text{ if }|t|>|u|,$

where $ru-st=1$ and $g$ runs over a set of pairwise inequivalent forms of
discriminant $\Delta(f)$. Similarly, one obtains the expression

(2.7) $\frac{v}{n}=\frac{s}{\alpha
u}-\frac{a_{2}t+2a_{1}u+bt}{2aug(t,u)}\text{ if }|t|<|u|.$

Let $\theta(t,u)$ denote the representation of $v/n$ given by (2.6) or (2.7).
Let $-D=\Delta(f)$, and let ${\mathcal{F}}(-D)$ denote a fundamental set of
forms of discriminant $-D$. We then have the following key formula:

(2.8) $\sum_{n\leq X}\rho_{h}(n)=\sum_{\begin{subarray}{c}g(t,u)\leq X\\\
g\in{\mathcal{F}}(-D)\end{subarray}}e(h\theta(t,u)).$

From here, examining Hooley’s argument in [6] reveals that the only further
dependence on $f$ comes from estimating the size of

$F_{2}(t)-F_{1}(t),$

where

$F_{2}(t)=\min\left\\{|t|,-\frac{a_{1}t}{a_{0}}+\frac{1}{a_{0}}(a_{0}X+Dt^{2})^{1/2}\right\\}$

and

$F_{1}(t)=\max\left\\{-|t|,-\frac{a_{1}t}{a_{0}}-\frac{1}{a_{0}}(a_{0}X+Dt^{2})^{1/2}\right\\}.$

We then see that

$F_{2}(t)-F_{1}(t)\ll|t|+\sqrt{\frac{X}{a_{0}}}+\frac{\sqrt{D}\cdot|t|}{a_{0}}$

with the implied constant being absolute. We note that since $g$ is positive
definite and reduced, we have $a_{0}\geq\sqrt{D}$, from which we obtain the
simplified bound

$F_{2}(t)-F_{1}(t)\ll|t|+X^{1/2}D^{-1/4}.$

Examining the $\max,\min$ functions in the definitions of $F_{1},F_{2}$ we see
that $F_{2}(t)-F_{1}(t)\ll|t|$ with an absolute implied constant. Hooley’s
argument in [6] then proceeds with an absolute implied constant, giving the
bound

(2.9) $\left\lvert\sum_{n\leq
X}\rho_{h}(n)\right\rvert=O\left(|h|^{4/5}\sigma_{-1/2}^{2}(h)X^{4/5}(\log
X)^{2}\right),$

where $\sigma_{z}(n)=\sum_{m|n}m^{z}$. Feeding this into (2.3) we obtain the
bound

$O\left(X^{4/5}(\log X)^{2}\sum_{1\leq h\leq
N}\frac{\sigma_{-1/2}^{2}(h)}{h^{1/5}}\right),$

which is the same estimate as in equation (41) in [6]. Optimizing for $N$ in
(2.3) we obtain

(2.10) $D_{f}(X)=O\left(X^{8/9}(\log X)^{3}\right),$

with absolute implied constant.

##  3\. Counting in a fundamental domain

We now begin the first of two proofs of our main theorem. By the fundamental
work of Gauss, we may parametrize
$\operatorname{SL}_{2}({\mathbb{Z}})$-equivalence classes of positive definite
binary quadratic forms having discriminant bounded by $X$ by integral points
in some bounded domain:

(3.1) ${\mathcal{F}}(X)=\\{(a,b,c)\in{\mathbb{Z}}^{3}:|b|\leq a\leq
c,a,c>0,0<4ac-b^{2}\leq X\\}.$

We remark immediately that

$4p-1=4ac-b^{2}\geq 4ac-a^{2}\geq 3a^{2},$

whence

(3.2) $a\leq\sqrt{\frac{4p}{3}}.$

We are interested in integral points in ${\mathcal{F}}(X)$ for which
$4ac-b^{2}=4p-1$, where $p$ is a prime. Clearly, this equation implies that
$b$ is odd, say $b=2k+1$. We then have the expression

$ac=k^{2}+k+p.$

We make a trivial but important observation: the right hand side is odd for
all $p\geq 3$. Indeed, the term $k^{2}+k=k(k+1)$ is always even. This implies
that $a,c$ must both be odd.

That the triple $(a,b,c)=(a,2k+1,c)\in{\mathcal{F}}(X)$ implies

(3.3) $|2k+1|\leq a\leq\sqrt{4p/3},$

from which we obtain

(3.4) $|k|\leq\frac{a-1}{2}.$

Next note that

$4p-1=4ac-b^{2}\geq 4a^{2}-b^{2},$

hence

$b^{2}\geq 4a^{2}-4p+1.$

This lower bound is non-trivial if and only if $a\geq\sqrt{p}$. In this case
we obtain

$k^{2}+k\geq a^{2}-p,$

or equivalently,

(3.5) $|k|\geq\sqrt{a^{2}-p}.$

We are then led to the following sum

(3.6) $\displaystyle Q(X)$ $\displaystyle=\sum_{p\leq X}\left(\sum_{1\leq
a\leq\sqrt{p}}\sum_{\begin{subarray}{c}a|k^{2}+k+p\\\ |k|\leq
a/2\end{subarray}}1+\sum_{\sqrt{p}\leq
a\leq\sqrt{4p/3}}\sum_{\begin{subarray}{c}a|k^{2}+k+p\\\
\sqrt{a^{2}-p}\leq|k|\leq a/2\end{subarray}}1\right)$
$\displaystyle=\sum_{p\leq
X}\left({\mathcal{T}}_{1}(p)+{\mathcal{T}}_{2}(p)\right)$
$\displaystyle=Q_{1}(X)+Q_{2}(X),$

say.

The term $Q_{1}(X)$ is already in the shape that we want, since the inner sum
runs over a complete set of residues. More work, indeed, a substantial amount
of work, is needed to get $Q_{2}(X)$, and in particular ${\mathcal{T}}_{2}(p)$
into an acceptable form.

To treat ${\mathcal{T}}_{2}(p)$, we partition the interval
$[\sqrt{p},\sqrt{4p/3})$ into subintervals of the shape

$[\kappa\sqrt{p},(\kappa+N^{-1})\sqrt{p})$

with $1\leq\kappa\leq 2/\sqrt{3}$ and $N$ a large positive integer (which may
depend on $X$). We want to estimate the sum

${\mathcal{T}}_{2}(\kappa;p)=\sum_{\kappa\sqrt{p}\leq
a\leq(\kappa+N^{-1})\sqrt{p}}\sum_{\begin{subarray}{c}a|k^{2}+k+p\\\
\sqrt{a^{2}-p}\leq|k|\leq a/2\end{subarray}}1.$

Writing $a=\sqrt{p}(\kappa+\delta)$ with $\delta=O\left(N^{-1}\right)$ we find
that

$\sqrt{p}=\frac{a}{\kappa+\delta}=\frac{a}{\kappa}\left(1+O(N^{-1})\right),$

whence

$a\sqrt{1-\kappa^{-2}+O(N^{-1})}\leq|k|\leq a/2.$

Note that

$\displaystyle\sqrt{1-\kappa^{-2}+O(N^{-1})}-\sqrt{1-\kappa^{-2}}$
$\displaystyle=\frac{1-\kappa^{-2}+O(N^{-1})-1+\kappa^{-2}}{\sqrt{1-\kappa^{-2}+O(N^{-1})}+\sqrt{1-\kappa^{-2}}}$
$\displaystyle=O(N^{-1}).$

We write

(3.7) ${\mathcal{T}}_{2}^{\ast}(\kappa;p)=\sum_{\kappa\sqrt{p}\leq
a\leq(\kappa+N^{-1})\sqrt{p}}\sum_{\begin{subarray}{c}a|k^{2}+k+p\\\
a\sqrt{1-\kappa^{-2}}\leq|k|\leq a/2\end{subarray}}1.$

We see that

$\sum_{p\leq X}\sum_{j=N}^{\lfloor
2N/\sqrt{3}\rfloor}\left({\mathcal{T}}_{2}(j/N,p)-{\mathcal{T}}_{2}^{\ast}(j/N,p)\right)\ll\int_{1}^{X^{1/2}}\int_{a}^{X/a}\int_{I_{a}}dbdcda,$

where $I_{a}$ is an interval of length $O(a/N)$. The triple integral on the
right satisfies

$\int_{1}^{X^{1/2}}\int_{a}^{X/a}\int_{I_{a}}dbdcda=O\left(\frac{X^{3/2}}{N},\right)$

which will be small enough with an appropriate choice of $N$, say
$N=\lfloor(\log X)^{A}\rfloor$. We can then apply Proposition 2.5 to
${\mathcal{T}}_{2}^{\ast}(\kappa,p)$ to obtain

(3.8)
${\mathcal{T}}_{2}^{\ast}(\kappa,N;p)=\left(1-2\sqrt{1-\kappa^{-2}}\right)\sum_{\kappa\sqrt{p}\leq
a\leq(\kappa+N^{-1})\sqrt{p}}\sum_{\begin{subarray}{c}a|k^{2}+k+p\\\ |k|\leq
a/2\end{subarray}}1+O\left(p^{4/9}(\log p)^{3}\right).$

Summing the error term over $p\leq X$ gives

(3.9) $\sum_{p\leq X}p^{4/9}(\log p)^{3}\ll X^{13/9}(\log X)^{2}.$

We may thus focus on sums of the shape

(3.10) $Q(\kappa,N;X)=\sum_{p\leq X}\sum_{\kappa\sqrt{p}\leq
a\leq(\kappa+N^{-1})\sqrt{p}}\sum_{\begin{subarray}{c}a|k^{2}+k+p\\\ |k|\leq
a/2\end{subarray}}1.$

The inner most sum exactly counts the number of solutions to the congruence

$k^{2}+k+p\equiv 0\pmod{a}.$

We know that this is given by the expression

$\sum_{m|a}\left(\frac{1-4p}{m}\right).$

This gives

$Q(\kappa,N;X)=\sum_{p\leq X}\sum_{\kappa\sqrt{p}\leq
a\leq(\kappa+N^{-1})\sqrt{p}}\sum_{m|a}\left(\frac{1-4p}{m}\right).$

Note that

$\kappa\sqrt{p}\leq a\leq(\kappa+N^{-1})\sqrt{p}$

if and only if

$\frac{a^{2}}{\kappa^{2}}\left(1-\frac{1}{M+1}\right)\leq
p\leq\frac{a^{2}}{\kappa^{2}},$

where $M=N/\kappa$. Hence we may switch order of summation and then abuse
notation to obtain

$Q(\kappa,M;X)=\sum_{a\leq\kappa
X^{1/2}(1+(M-1)^{-1})}\sum_{a^{2}(1-M^{-1})/\kappa^{2}\leq p\leq
a^{2}/\kappa^{2}}\sum_{m|a}\left(\frac{1-4p}{m}\right).$

Writing $Y=\kappa X^{1/2}(1+(M-1)^{-1})$ for convenience and then using
symmetry, we find that

(3.11) $Q(\kappa,M;X)=\sum_{\begin{subarray}{c}mn\leq Y\\\ m\leq
n\end{subarray}}\sum_{(mn)^{2}(1-M^{-1})/\kappa^{2}\leq
p\leq(mn)^{2}/\kappa^{2}}\left(\left(\frac{1-4p}{m}\right)+\left(\frac{1-4p}{n}\right)\right).$

Our goal is to eventually take advantage of the oscillation of the Jacobi
symbol; see Lemma 2.1. Before we can do so we must massage the sums
$Q(\kappa,N-1;X)$ so that we are summing over square-free numbers, and this
requires applying a square-free sieve over the terms $m,n,4p-1$. For $m,n$
this is very easy to do but the irregularity introduced by having the variable
running over primes introduces some minor difficulties.

We write

(3.12) $Q^{\dagger}(\kappa,M;X)=\sum_{\begin{subarray}{c}mn\leq Y\\\ m\leq
n\end{subarray}}\text{
}\sum_{\begin{subarray}{c}(mn)^{2}(1-M^{-1})/\kappa^{2}\leq
p\leq(mn)^{2}/\kappa^{2}\\\ k^{2}|4p-1\Rightarrow k\leq(\log
X)^{2A}\end{subarray}}\left(\left(\frac{1-4p}{m}\right)+\left(\frac{1-4p}{n}\right)\right)$

and

$Q^{\ddagger}(\kappa,M;X)=Q(\kappa,M;X)-Q^{\dagger}(\kappa,M;X).$

We proceed to show that $Q^{\ddagger}(\kappa,M;X)$ is an error term. To do so
we note that

$\displaystyle Q^{\ddagger}(\kappa,M;X)$
$\displaystyle=\sum_{\begin{subarray}{c}m\leq Y\\\ m\leq
n\end{subarray}}\sum_{\begin{subarray}{c}(mn)^{2}(1-M^{-1})/\kappa^{2}\leq
p\leq(mn)^{2}/\kappa^{2}\\\ \exists k^{2}|4p-1\text{ s.t
}k>\xi\end{subarray}}\left(\left(\frac{1-4p}{m}\right)+\left(\frac{1-4p}{n}\right)\right)$
$\displaystyle\leq 2\sum_{\begin{subarray}{c}m\leq Y\\\ m\leq
n\end{subarray}}\sum_{\begin{subarray}{c}(mn)^{2}(1-M^{-1})/\kappa^{2}\leq
p\leq(mn)^{2}/\kappa^{2}\\\ \exists k^{2}|4p-1\text{ s.t
}k>\xi\end{subarray}}1$ $\displaystyle\leq 2\sum_{\begin{subarray}{c}m\leq
Y\\\ m\leq
n\end{subarray}}\sum_{\begin{subarray}{c}(mn)^{2}(1-M^{-1})/\kappa^{2}\leq
p\leq(mn)^{2}/\kappa^{2}\\\ \exists k^{2}|4p-1\text{ s.t
}k>\xi\end{subarray}}1,$

where $s$ runs over the integers instead of primes. We denote this last inner
sum by $S(X)$. We shall prove the following:

######  Lemma 3.1.

We have

$S(X)=O\left(\frac{X}{\xi}+X^{1/2}\right)$

###### Proof.

For a fixed integer $k$, we note that

$\displaystyle S(k;X)$ $\displaystyle=\\#\\{s\leq X:k^{2}|4n-1\\}$
$\displaystyle=\frac{X}{k^{2}}+O(1).$

Moreover, if $k^{2}|4n-1$ and $n\leq X$, then $k\ll X^{1/2}$. Thus

$\displaystyle S(X)$ $\displaystyle\ll\sum_{\xi<k\ll
X^{1/2}}\left(\frac{X}{k^{2}}+O(1)\right)$
$\displaystyle\ll\frac{X}{\xi(X)}+X^{1/2},$

as desired. ∎

We have thus obtained the following conclusion:

######  Proposition 3.2.

Let $Q(\kappa,M;X)$ be as in (3.11) and $Q^{\dagger}(\kappa,M;X)$ be as in
(3.12). Then

$Q(\kappa,M,X)=Q^{\dagger}(\kappa,M;X)+O_{A}\left(\frac{X}{(\log
X)^{A}}\right).$

We denote by

$R_{1}(\kappa,M;X)=\sum_{\begin{subarray}{c}mn\leq Y\\\ m\leq
n\end{subarray}}\sum_{(mn)^{2}(1-M^{-1})/\kappa^{2}\leq
p\leq(mn)^{2}/\kappa^{2}}\left(\frac{1-4p}{m}\right)$

and

$R_{2}(\kappa,M;X)=\sum_{\begin{subarray}{c}mn\leq Y\\\ m\leq
n\end{subarray}}\sum_{(mn)^{2}(1-M^{-1})/\kappa^{2}\leq p\leq
mn^{2}/\kappa^{2}}\left(\frac{1-4p}{n}\right).$

We shall now show that $R_{1}(\kappa,M;X)$ gives the expected main term (for
either $Q_{1}(X)$ or $Q_{2}(X)$), while $R_{2}(\kappa,M;X)$ contributes
negligibly. By Proposition 3.2, it suffices to consider the corresponding sums
$Q_{1}^{\dagger}(\kappa,M;X),Q_{2}^{\dagger}(\kappa,M;X)$, with identical
restrictions on $p$. We shall focus on the second goal for now. To show that
$Q_{2}^{\dagger}(\kappa,M;X)$ is small, we shall need Lemma 2.1.

We may now deal with $Q_{2}^{\dagger}(\kappa,M;X)$. Since the Jacobi symbol
depends only on $p,n$, we do not need to worry about the $m$-variable. We
write

$n=n_{1}n_{2}^{2},$

with $n_{1}$ square-free (though not necessarily co-prime with $n_{2}$). We
then have

(3.13) $Q_{2}^{\dagger}(\kappa,M;X)=$ $\sum_{m\leq Y^{1/2}}\sum_{n_{2}\leq
Y^{1/2}/m^{1/2}}\sum_{m/n_{2}^{2}\leq n_{1}\leq X^{1/2}/(mn_{2}^{2})}\text{
}\sum_{\begin{subarray}{c}\kappa(mn_{1}n_{2}^{2})^{2}(1-M^{-1})/\kappa^{2}\leq
p\leq(mn_{1}n_{2}^{2})^{2}/\kappa^{2}\\\ 4p-1=k^{2}s,s\text{ square-free}\\\
\ell|k\Rightarrow\ell<\xi(X)\\\ k<(\log
X)^{2A}\end{subarray}}\left(\frac{1-4p}{n_{1}}\right)$ $=\sum_{m\leq
Y^{1/2}}\sum_{n_{2}\leq Y^{1/2}/m^{1/2}}\sum_{m/n_{2}^{2}\leq n_{1}\leq
X^{1/2}/(mn_{2}^{2})}\text{
}\sideset{}{{}^{(1)}}{\sum}\left(\frac{1-4p}{n_{1}}\right)$

say.

The inner double sum in (3.13) is equal to

$\sum_{m/n_{2}^{2}\leq n_{1}\leq
X^{1/2}/(mn_{2}^{2})}\sideset{}{{}^{(1)}}{\sum}\left(\frac{-s}{n_{1}}\right)$

which we can rewrite as

(3.14) $\sum_{k\leq(\log X)^{2A}}\sum_{m/n_{2}^{2}\leq n_{1}\leq
X^{1/2}/(mn_{2}^{2})}\text{
}\sum_{\begin{subarray}{c}(mn_{1}n_{2}^{2})^{2}(1-N^{-1})/(2k\kappa)^{2}\leq
s\leq(mn_{1}n_{2}^{2})^{2}/(2k\kappa)^{2}\\\ s\text{ square-
free}\end{subarray}}\alpha_{s}\left(\frac{-s}{n_{1}}\right),$

where

$\alpha_{s}=\begin{cases}1&\text{if }(k^{2}s+1)/4\text{ is prime}\\\
0&\text{otherwise}.\end{cases}$

The sum (3.14) is now amenable to Lemma 2.1, since both $n_{1},s$ are square-
free. Restricting $n_{1}$ to a dyadic interval $[N_{1},2N_{1})$ say we obtain
the bound

$O_{\varepsilon}\left(N_{1}\cdot\frac{(mn_{2}^{2}N_{1})^{2}}{k^{2}}\left(\frac{k}{mn_{2}^{2}N_{1}}+\frac{1}{N_{1}^{1/2}}\right)X^{\varepsilon}\right)=O_{\varepsilon}\left(X^{\varepsilon}\left(\frac{mn_{2}^{2}N_{1}^{2}}{k}+\frac{(mn_{2}^{2})^{2}N_{1}^{5/2}}{k^{2}}\right)\right).$

Summing over $k$ and $N_{1}\ll X^{1/2}/mn_{2}^{2}$ and noting that
$k=O_{A,\varepsilon}\left(X^{\varepsilon}\right)$, we get a total contribution
at most

$O_{A,\varepsilon}\left(\frac{X^{5/4+\varepsilon}}{m^{1/2}n_{2}}\right).$

Feeding this back into (3.13) we see that

$Q_{2}^{\dagger}(\kappa,N-1;X)=O_{\varepsilon}\left(X^{11/8+\varepsilon}\right).$

We move on to estimating $Q_{1}^{\dagger}(\kappa,N-1;X)$. Again we need to
isolate the square-free part of $m$. As before, write $m=m_{1}m_{2}^{2}$ with
$m_{1}$ square-free. We note that

(3.15) $\displaystyle Q_{1}^{\dagger}(\kappa,N-1;X)=\sum_{m\leq
Y^{1/2}}\sum_{m\leq n\leq X^{1/2}/m}\text{
}\sum_{\begin{subarray}{c}(mn)^{2}(1-N^{-1})/\kappa^{2}\leq p\leq
mn^{2}/\kappa^{2}\\\ 4p-1=k^{2}s,s\text{ square-free}\\\ k<(\log
X)^{A}\end{subarray}}\left(\frac{1-4p}{m}\right)$ $\displaystyle=\sum_{n\leq
Y}\sum_{\begin{subarray}{c}m_{1}m_{2}^{2}\leq\min\\{n,Y/n\\}\end{subarray}}\text{
}\sum_{\begin{subarray}{c}(mn)^{2}(1-N^{-1})/\kappa^{2}\leq p\leq
mn^{2}/\kappa^{2}\\\ 4p-1=k^{2}s,s\text{ square-free}\\\ k<(\log
X)^{A}\end{subarray}}\left(\frac{1-4p}{m_{1}}\right)$
$\displaystyle=\sum_{n\leq
Y}\sum_{1<m_{2}\leq\min\\{n^{1/2},Y^{1/2}/n^{1/2}\\}}\text{ }\sum_{m_{1}\leq
Y/nm_{2}^{2}}\text{
}\sum_{\begin{subarray}{c}(mn)^{2}(1-N^{-1})/\kappa^{2}\leq p\leq
mn^{2}/\kappa^{2}\\\ 4p-1=k^{2}s,s\text{ square-free}\\\ k<(\log
X)^{A}\end{subarray}}\left(\frac{1-4p}{m_{1}}\right)$
$\displaystyle=\sum_{n\leq
Y}\sum_{1<m_{2}\leq\min\\{n^{1/2},Y^{1/2}/n^{1/2}\\}}\sum_{k\leq(\log
X)^{2A}}\sum_{m_{1}\leq Y/nm_{2}^{2}}\text{
}\sum_{\begin{subarray}{c}(nm_{1}m_{2}^{2})^{2}(1-N^{-1})/(2\kappa k)^{2}\leq
s\leq(nm_{1}m_{2}^{2})^{2}/(2\kappa k)^{2}\\\ s\text{ square-
free}\end{subarray}}\alpha_{s}\left(\frac{-s}{m_{1}}\right)$

We must be more careful in our application of Lemma 2.1, since the sum over
$n$ is very long. Indeed, we must use the more precise variant of the lemma
rather than the coarser but more convenient version with the $\varepsilon$,
since the sum over $m_{1}$ is much shorter than the sum over $p$. We shall
consider the separate cases when $n<X^{1/2}(\log X)^{-A}$ and when
$n>X^{1/2}(\log X)^{-A}$.

In the former case we restrict $m_{1}$ to dyadic intervals $[M_{1},2M_{1})$
and then apply Lemma 2.1. Summing over $M_{1}\ll X^{1/2}/nm_{2}^{2}$ we obtain
the estimate

$O\left(\frac{X^{5/4}}{k^{2}n^{1/2}m_{2}}+\frac{kX^{1/4}}{n^{3/2}m_{2}^{3}}\right)$

for the inner double sum in the last line of (3.15). We put this back into
(3.15) to obtain the sum

$\sum_{n\leq X^{1/2}(\log
X)^{-A}}\sum_{m_{2}\leq\min\\{n,X^{1/2}/n\\}}\frac{X^{5/4}}{n^{1/2}m_{2}}.$

We then have

$\displaystyle\sum_{n\leq X^{1/2}(\log
X)^{-A}}\sum_{m_{2}\leq\min\\{n,X^{1/2}/n\\}}\frac{1}{n^{1/2}m_{2}}$
$\displaystyle\ll\sum_{n\leq X^{1/2}(\log X)^{-A}}\frac{\log X}{n^{1/2}}$
$\displaystyle\ll X^{1/4}(\log X)^{-A/2+1}$

which suffices for our purposes by choosing $A>4$.

When $n>X^{1/2}(\log X)^{-A}$ the sum over $m$ is very short: indeed, we see
that $m<(\log X)^{A}$. Thus we may use the Siegel-Walfisz theorem to handle
the inner sum over $p$. Applying Lemma 2.4 to (3.15) gives

$Q_{1}^{\dagger}(\kappa,N-1;X)$ $=\sum_{X^{1/2}(\log X)^{-A}<n\leq
Y}\sum_{m\leq
Y/n}\left(\frac{\mu(m)}{\phi(m)}\int_{(mn)^{2}(1-N^{-1})/\kappa^{2}}^{(mn)^{2}/\kappa^{2}}\frac{dt}{\log
t}+O_{A}\left(X(\log X)^{-A}\right)\right).$

The sum over the error term is

$O\left(X^{3/2}(\log X)^{-A+1}\right),$

which is sufficiently small if we take $A>2$. For the main term we rearrange
as follows:

$\displaystyle\sum_{X^{1/2}(\log X)^{-A}<n\leq Y}\sum_{m\leq
X^{1/2}/n}\frac{\mu(m)}{\phi(m)}\int_{(mn)^{2}(1-N^{-1})/\kappa^{2}}^{(mn)^{2}/\kappa^{2}}\frac{dt}{\log
t}$ $\displaystyle=\int_{X(\log X)^{-2A}}^{X}\left(\sum_{X^{1/2}(\log
X)^{-A}<n\leq t^{1/2}}\sum_{t^{1/2}\kappa/n\leq m\leq t^{1/2}\kappa
N^{1/2}/n(N-1)^{1/2}}\frac{\mu(m)}{\phi(m)}\right)\frac{dt}{\log t}$
$\displaystyle=\int_{X(\log X)^{-2A}}^{X}\left(\sum_{m\leq(\log
X)^{A}}\frac{\mu(m)}{\phi(m)}\sum_{t^{1/2}\kappa/m<n\leq(Nt)^{1/2}\kappa/m(N-1)^{1/2}}1\right)\frac{dt}{\log
t}$ $\displaystyle=\int_{X(\log X)^{-2A}}^{X}\left(\sum_{m\leq(\log
X)^{A}}\frac{\mu(m)}{\phi(m)}\left(\frac{t^{1/2}\kappa}{m}\cdot\frac{1}{N-1+\sqrt{N(N-1)}}+O(1)\right)\right)\frac{dt}{\log
t}$ $\displaystyle=\int_{X(\log X)^{-2A}}^{X}\left(\sum_{m\leq(\log
X)^{A}}\frac{\mu(m)}{\phi(m)}\left(\frac{\kappa
t^{1/2}}{2mN}+O\left(\frac{t^{1/2}}{mN^{2}}\right)\right)\right)\frac{dt}{\log
t}$ $\displaystyle=\frac{\kappa}{N}\sum_{m\leq(\log
X)^{A}}\frac{\mu(m)}{m\phi(m)}\int_{X(\log X)^{-A}}^{X}\frac{t^{1/2}dt}{\log
t}+O_{A}\left(X^{3/2}(\log X)^{-A+1}\right).$

We first note that

$\sum_{\begin{subarray}{c}m\leq Z\\\ m\text{
odd}\end{subarray}}\frac{\mu(m)}{m\phi(m)}=\sum_{m\text{
odd}}\frac{\mu(m)}{m\phi(m)}+O\left(Z^{-1}\right),$

and that the completed sum is equal to the Euler product

$\prod_{\ell\geq 3}\left(1-\frac{1}{\ell(\ell-1)}\right)=2C_{\text{Art}}.$

It follows that

$Q_{1}^{\dagger}(\kappa,N-1;X)=\frac{\kappa}{N}2C_{\text{Art}}\int_{X(\log
X)^{-A}}^{X}\frac{t^{1/2}}{2\log t}+O_{A}\left(X^{3/2}(\log X)^{-A+1}\right).$

We now renormalize and replace $N$ with $N/\kappa$, and then consider
$\kappa=j/N$ with $N\leq j\leq\lfloor 2N/\sqrt{3}\rfloor$. We then consider

(3.16) $\sum_{N\leq j\leq
2N/\sqrt{3}}\left(1-2\sqrt{1-\left(\frac{j}{N}\right)^{2}}\right)\left(\frac{C_{\operatorname{Art}}}{N}\int_{X(\log
X)^{-A}}^{X}\frac{t^{1/2}dt}{\log t}+O_{A}\left(X^{3/2}(\log
X)^{-A+1}\right)\right).$

The sum over the error term is small by first choosing $A$ large, and then
supposing $N<(\log X)^{A^{\prime}}$ with $A^{\prime}<A-3$, say.

The sum

$\sum_{N\leq j\leq 2N/\sqrt{3}}N^{-1}\left(1-2\sqrt{1(j/N)^{2}}\right)$

is a Riemann sum for the integral

$\int_{1}^{2/\sqrt{3}}(1-2\sqrt{1-x^{-2}})dx=\frac{\pi}{3}-1,$

and the integrand $1-\sqrt{1-x^{-2}}$ is decreasing on $[1,\infty)$. Hence the
Riemann sum approximates the integral by

$\left\lvert\sum_{N\leq j\leq
2N/\sqrt{3}}N^{-1}\left(1-2\sqrt{(N/j)^{2}}\right)-\int_{1}^{2/\sqrt{3}}(1-2\sqrt{1-x^{-2}})dx\right\rvert\ll
N^{-1}.$

It follows that (3.16) is equal to

$\left(\frac{\pi}{3}-1\right)C_{\operatorname{Art}}\int_{2}^{X}\frac{t^{1/2}dt}{\log
t}+O_{A}\left(\frac{X^{3/2}}{(\log X)^{A}}\right).$

Evaluating the analogous sum for (3.16) but over the range $1\leq j<N$ and
summing gives

(3.17)
$Q(X)=C_{\operatorname{Art}}\cdot\frac{\pi}{3}\int_{2}^{X}\frac{t^{1/2}dt}{\log
t}+O_{A}\left(\frac{X^{3/2}}{(\log X)^{A}}\right).$

Applying integration by parts we see

$\displaystyle\int_{2}^{X}\frac{t^{1/2}dt}{\log t}$
$\displaystyle=\left[\frac{2t^{3/2}}{3\log
t}\right]_{2}^{X}-\frac{2}{3}\int_{2}^{X}t^{3/2}\left(\frac{1}{\log
t}\right)^{\prime}dt$ $\displaystyle=\frac{2X^{3/2}}{3\log
X}+\frac{2}{3}\int_{2}^{X}\frac{t^{1/2}dt}{(\log t)^{2}}dt+O(1),$

hence

$Q(X)=C_{\operatorname{Art}}\cdot\frac{2\pi}{9}\cdot\frac{X^{3/2}}{\log
X}+O\left(\frac{X^{3/2}}{(\log X)^{2}}\right)$

as required for the proof of Theorem 1.1.

##  4\. Alternate approach via the analytic class number formula

We now give our second proof, which is similar to the approaches of Nagoshi
[11] for discriminant $1-4p$ and Friedlander-Iwaniec [5] for discriminant
$-4p$, where we estimate the sum of class numbers via the analytic class
number formula.

The class number formula gives

$h(D)=\frac{1}{\pi}L(1,\chi_{D})|D|^{1/2}$

for any discriminant $D<0$: it holds even for non-fundamental $D$, when $h(D)$
is defined as the number of primitive equivalence classes of binary quadratic
forms of discriminant $D$. The number of all binary quadratic forms of
discriminant $D$, including the non-primitive ones, is

$H(D)=\sum_{d}h(D/d^{2})$

where the sum is over all $d$ such that $D/d^{2}$ is a discriminant.

Summing over all $D=1-4p$ with $p\leq X$, we can write our sum
$Q(X)=\sum_{p\leq X}H(1-4p)$ as

$Q(X)=\sum_{d\geq 1}Q_{d}(X)$

where we define $Q_{d}(X)=\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid
1-4p\end{subarray}}h(\frac{1-4p}{d^{2}})$ for $d$ odd (and $0$ for $d$ even).
Applying the class number formula, we also have

(4.1) $Q_{d}(X)=\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid
1-4p\end{subarray}}\frac{1}{\pi}L(1,\chi_{(1-4p)/d^{2}})\left|\frac{4p-1}{d^{2}}\right|^{1/2}=\frac{1}{\pi
d}\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid 1-4p\end{subarray}}\sum_{n\geq
1}\frac{(4p-1)^{1/2}}{n}\genfrac{(}{)}{}{}{(1-4p)/d^{2}}{n}.$

It will be convenient to us to first bound the related quantity

$T_{d}(X)=\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid
1-4p\end{subarray}}L(1,\chi((1-4p)/d^{2}))=\sum_{\begin{subarray}{c}p\leq X\\\
d^{2}\mid 1-4p\end{subarray}}\sum_{n\geq
1}\genfrac{(}{)}{}{}{(1-4p)/d^{2}}{n}\frac{1}{n}.$

We define a multiplicative function $c(d)$, which will feature in the leading
terms.

######  Definition 4.1.

For $d$ odd we set

(4.2) $c(d):=\frac{1}{d^{3}}\prod_{\ell\mid
d}\frac{\ell^{3}-1}{\ell^{3}-\ell^{2}-\ell-1}$

and for $d$ even we have $c(d)=0$.

######  Lemma 4.2.

If $d\ll(\log X)^{\alpha}$ for some fixed $\alpha$, then

$T_{d}(X)=\frac{\pi^{2}}{12}\cdot dc(d)\prod_{\ell\text{
odd}}\frac{\ell^{3}-\ell^{2}-\ell-1}{\ell^{3}-\ell^{2}}X/\log X+o(X/\log X),$

######  Lemma 4.3.

$Q_{d}(X)=\frac{\pi}{9}c(d)\prod_{\ell\text{
odd}}\frac{\ell^{3}-\ell^{2}-\ell-1}{\ell^{3}-\ell^{2}}X^{3/2}/\log
X+o(X^{3/2}/\log X)$

######  Theorem 4.4.

$Q(X)=\frac{2\cdot\pi}{9}C_{\text{Art}}X^{3/2}/\log X+o(X)$.

The heart of the argument is in the proof of Lemma 4.2, which we defer to
Section 4.1. We now assume it and prove the other results

###### Proof of Lemma 4.3.

We apply partial summation to

(4.3) $\begin{split}Q_{d}(X)&=\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid
1-4p\end{subarray}}\frac{1}{\pi}L(1,\chi_{(1-4p)/d^{2}})\left|\frac{4p-1}{d^{2}}\right|^{1/2}\\\
&=\frac{1}{\pi
d}\left((4X-1)^{1/2}T_{d}(X)+\sum_{t=1}^{X-1}\left((4t-1)^{1/2}-(4(t+1)-1)^{1/2}\right)T_{d}(t)\right)\\\
&=\frac{1}{\pi
d}\left(X^{1/2}(2+O(X^{-1}))T_{d}(X)-\sum_{t=1}^{X-1}(t^{-1/2}+O(t^{-3/2}))T_{d}(t)\right)\\\
&=\frac{\pi}{12}\cdot c(d)\prod_{\ell\text{
odd}}\frac{\ell^{3}-\ell^{2}-\ell-1}{\ell^{3}-\ell^{2}}\left(2(X^{3/2}/\log
X)-\sum_{t=1}^{X}t^{1/2}/\log t+o(X^{3/2}/\log X))\right)\\\ &=(\pi/9)\cdot
c(d)\prod_{\ell\text{
odd}}\frac{\ell^{3}-\ell^{2}-\ell-1}{\ell^{3}-\ell^{2}}(X^{3/2}/\log
X)+o(X^{3/2}/\log X).\end{split}$

where we apply Lemma 4.2 at the next-to-last step and use
$\sum_{t=1}^{X}t^{1/2}/\log t=(\frac{2}{3}+o(1))X^{3/2}/(\log X)$ in the last.

∎

We now sum over $d$ to obtain the asymptotic for $Q$:

###### Proof of Theorem 4.4.

Using $L(1,\chi_{D})=O(\log D)$, we have the trivial bound

$Q_{d}(X)\ll\sum_{\begin{subarray}{c}m\leq X\\\ d^{2}\mid
1-4m\end{subarray}}\log X\frac{\sqrt{X}}{d}\asymp d^{-3}X\log X.$

Hence we can cut off the sum at $X^{\alpha}$ for any $\alpha>1/2$.

$Q(X)=\sum_{d\in[1,X]\text{ odd}}Q_{d}(X)=\sum_{d\in[1,\log(X)^{\alpha}]\text{
odd}}Q_{d}(X)+o(X^{3/2}/\log(X))$

We now apply Lemma 4.3 to obtain

(4.4) $\begin{split}Q(X)&=\sum_{d\in[1,\log(X)^{\alpha}]\text{
odd}}Q_{d}(X)+o(X^{3/2}/\log(X))\\\ &=\prod_{\ell\text{
odd}}\frac{\ell^{3}-\ell^{2}-\ell-1}{\ell^{3}-\ell^{2}}\left(\sum_{d\in[1,\log(X)^{\alpha}]}c(d)\right)X^{3/2}/\log(X)+o(X^{3/2}/\log(X))\end{split}$

(where we make the convention $c(d)=0$ for $d$ even).

We now need to evaluate the sum $\sum_{d=1}^{\infty}c(d)$, which we can expand
as an Euler product:

$\begin{split}\sum_{d=1}^{\infty}c(d)&=\sum_{d\geq 1\text{
odd}}d^{-3}\prod_{\ell\mid d}\frac{\ell^{3}-1}{\ell^{3}-\ell^{2}-\ell-1}\\\
&=\prod_{\ell\text{
odd}}1+\ell^{-3}(1-\ell^{-3})^{-1}\frac{\ell^{3}-1}{\ell^{3}-\ell^{2}-\ell-1}\\\
&=\prod_{\ell\text{
odd}}\frac{\ell^{3}-\ell^{2}-\ell}{\ell^{3}-\ell^{2}-\ell-1}\end{split}$

Hence $\sum_{d\in[1,\log(X)^{\alpha}]}c(d)=\prod_{\ell\text{
odd}}\frac{\ell^{3}-\ell^{2}-\ell}{\ell^{3}-\ell^{2}-\ell-1}+o(1)$. Plugging
this into (4.4), we obtain

$\begin{split}Q(X)&=\frac{\pi}{9}\prod_{\ell\text{
odd}}\left(\frac{\ell^{3}-\ell^{2}-\ell}{\ell^{3}-\ell^{2}-\ell-1}\cdot\frac{\ell^{3}-\ell^{2}-\ell-1}{\ell^{3}-\ell^{2}}\right)X^{3/2}/\log
X+o(X^{3/2}/\log(X))\\\ &=\frac{\pi}{9}\prod_{\ell\text{
odd}}\left(1-\frac{1}{\ell^{2}-\ell}\right)X^{3/2}/\log X+o(X^{3/2}/\log X)\\\
&=\frac{2\pi}{9}C_{\text{Art}}X^{3/2}/\log X.\end{split}$

as desired.

∎

###  4.1. Strategy for proof of Lemma 4.2

We now need to estimate

$T_{d}(X)=\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid
1-4p\end{subarray}}L(1,\chi((1-4p)/d^{2}))=\sum_{\begin{subarray}{c}p\leq X\\\
d^{2}\mid 1-4p\end{subarray}}\sum_{n\geq
1}\genfrac{(}{)}{}{}{(1-4p)/d^{2}}{n}\frac{1}{n}.$

under the assumption that $d\ll(\log X)^{\alpha}$.

First we want to cut off the tails of the inner sums, so that we have
something finite. We’ll choose $B$ such that for any $p\leq X$, $d\ll(\log
X)^{\alpha}$

$\sum_{n>B}\genfrac{(}{)}{}{}{(1-4p)/d^{2}}{n}\frac{1}{n}=o(1)$

By the partial summation argument given in [12], $B=X^{1/2+\delta}$ works for
any positive $\delta$. Then

$T_{d}(X)=T_{d}(X,[1,B])+o(X/\log X)$

where

$T_{d}(X,[1,B])=\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid
1-4p\end{subarray}}\sum_{1\leq n\leq
B}\genfrac{(}{)}{}{}{(1-4p)/d^{2}}{n}\frac{1}{n}.$

We now choose a second cutoff $b<B$, which we’ll choose small enough that we
can estimate $T_{d}(X,b)$ by Siegel-Walfisz, and then will estimate by
breaking up

$T_{d}(X,[1,b])=T_{d}(X,[1,b])+T_{d}(X,(b,B])$

where $T_{d}(X,[1,b])$ is the partial double sum with $n$ restricted to the
range $[1,b]$ and likewise for $T_{d}(X,(b,B])$.

We will estimate $T_{d}(X,[1,b])$ by Siegel-Walfisz and $T_{d}(X,(b,B])$ by
double oscillation.

###  4.2. Estimating $T_{d}(X,[1,b])$

We exchange order of summation, to get

(4.5) $T_{d}(X,[1,b])=\sum_{1\leq n\leq
b}\frac{1}{n}\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid
1-4p\end{subarray}}\genfrac{(}{)}{}{}{(1-4p)/d^{2}}{n}.$

We now estimate the inner sum. Note that $\genfrac{(}{)}{}{}{(1-4p)/d^{2}}{n}$
depends only on $p$ modulo $d^{2}n$, which for $n\leq b$ is bounded by a power
of $\log X$. We take $b$ to be $(\log X)^{\beta}$ for some fixed $\beta>4$, so
we get

(4.6) $\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid
1-4p\end{subarray}}\genfrac{(}{)}{}{}{(1-4p)/d^{2}}{n}=(\phi(d^{2})^{-1})a_{n,d}\operatorname{Li}(X)+O(X(\log
X)^{-A})$

for any $A>0$.

Here the constant fixed odd $d$, $a_{n,d}$ is a multiplicative function of
$n$. Hence it is determined by its values at prime powers, which can be
computed. We can then express the Dirichlet series for $a_{n,d}$ as the
following Euler product

(4.7)
$\begin{split}f_{d}(s)=\sum_{n}a_{n,d}n^{-s}=(1+2^{-s})^{-1}\prod_{\ell\nmid
d\text{
odd}}&\left(1-\left(\frac{1}{\ell-1}\right)(\ell^{-s}+\ell^{-2s})\right)\left(1-\ell^{-2s}\right)^{-1}\\\
\times&\prod_{\ell\mid d}(1-\ell^{-2s})^{-1}(1-\ell^{-2s-1})\\\
=(1-2^{-s})\zeta(2s)\prod_{\ell\nmid d\text{
odd}}&\left(1-\left(\frac{1}{\ell-1}\right)(\ell^{-s}+\ell^{-2s})\right)\prod_{\ell\mid
d}(1-\ell^{-2s-1}).\end{split}$

Now plugging (4.6) into (4.5), we obtain

(4.8) $T_{d}(X,[1,b])=\phi(d^{2})^{-1}\left(\sum_{1\leq n\leq
b}\frac{a_{n,d}}{n}\right)\operatorname{Li}(X)+O(X(\log X)^{-A}\log b)$

Now, this sum $\sum_{n\leq b}\frac{a_{n,d}}{n}$ converges absolutely as
$b\to\infty$, with sum

(4.9)
$\begin{split}\sum_{n}a_{n,d}n^{-1}=f_{d}(1)&=\frac{1}{2}\zeta(2)\prod_{\ell\nmid
d\text{
odd}}\left(1-\left(\frac{1}{\ell-1}\right)(\ell^{-1}+\ell^{-2})\right)\prod_{\ell\mid
d}(1-\ell^{-3})\\\ &=\frac{1}{2}\zeta(2)\prod_{\ell\mid
d}\left(\frac{\ell-1}{\ell}\right)\left(\frac{\ell^{3}-1}{\ell^{3}-\ell^{2}-\ell-1}\right)\prod_{\ell\text{
odd}}\left(\frac{\ell^{3}-\ell^{2}-\ell-1}{\ell^{3}-\ell^{2}}\right)\\\
&=\frac{1}{2}\zeta(2)d^{3}c(d)\prod_{\ell\mid
d}\left(\frac{\ell-1}{\ell}\right)\prod_{\ell\text{
odd}}\left(\frac{\ell^{3}-\ell^{2}-\ell-1}{\ell^{3}-\ell^{2}}\right).\end{split}$

using the definition of $c(d)$ in (4.2).

Since $b\to\infty$ as $X\to\infty$, we get asymptotically

(4.10)
$\begin{split}T(X,b)&=\phi(d^{2})^{-1}\cdot\frac{1}{2}\zeta(2)d^{3}c(d)\prod_{\ell\mid
d}\left(\frac{\ell-1}{\ell}\right)\prod_{\ell\text{
odd}}\frac{\ell^{3}-\ell^{2}-\ell-1}{\ell^{3}-\ell^{2}}\\\
&=\frac{\pi^{2}}{12}dc(d)\prod_{\ell\mid
d}\left(\frac{\ell^{3}-\ell}{\ell^{3}-\ell^{2}-\ell-1}\right)\end{split}$

###  4.3. Estimating $T_{[b,B]}(X)$

We will now apply the double oscillation Lemma (Lemma 2.2) to bound

$T_{[b,B]}(X)=\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid
1-4p\end{subarray}}\sum_{b<n\leq
B}\genfrac{(}{)}{}{}{(1-4p)/d^{2}}{n}\frac{1}{n}.$

As suggested by Friedlander-Iwaniec in [5], we divide the interval $[b,B]$
into dyadic intervals $[a,2a]$ and apply Lemma 2.2 on each.

######  Lemma 4.5.

For $a\ll X^{1/2}$,

$T_{[a,2a]}(X)=\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid
1-4p\end{subarray}}\sum_{a\leq n\leq
2a}\genfrac{(}{)}{}{}{(1-4p)/d^{2}}{n}\frac{1}{n}\ll X(\log X)\cdot a^{-1/2}$

###### Proof.

We rewrite

$T_{[a,2a]}(X)=\frac{1}{a}\sum_{\begin{subarray}{c}p\leq X\\\ d^{2}\mid
1-4p\end{subarray}}\sum_{a\leq n\leq
2a}\frac{a}{n}\genfrac{(}{)}{}{}{(1-4p)/d^{2}}{n}.$

so now all the coefficients in the inner sum are of size $\leq 1$, and Lemma
2.2 applies to give

$T_{[a,2a]}(X)\ll\frac{1}{a}\cdot aX(\log a+\log X)(a^{-1/2}+(X/a)^{-1/2})\ll
X\log X\cdot a^{-1/2},$

since $a\ll X^{1/2}$. ∎

We now apply this lemma to bound $T_{[b,B]}(X)$ as follows:

$T_{[b,B]}\leq\sum_{i=0}^{\lfloor\log_{2}(B/b)\rfloor-1}T_{[2^{i}b,2^{i+1}b]}(X)\ll
X\log X\cdot b^{-1/2}\sum_{i=0}^{\lfloor\log_{2}(B/b)\rfloor-1}2^{i/2}\ll
X\log Xb^{-1/2}.$

Since we have chosen $b=(\log X)^{\beta}$ for $\beta>4$, this is an error
term.

This completes the proof of Lemma 4.2.

## References

  * [1] A. Balog, V. Blomer, C. Dartyge, G. Tenebaum, _Friable values of binary forms_ , Comment. Math. Helv. 87 (2012), 639-667.
  * [2] W. Duke, J. B. Friedlander, H. Iwaniec, _Equidistribution of roots of a quadratic congruence to prime moduli_ , Ann. of. Math 141 (1995), 423-441.
  * [3] E. Fouvry, J. Kluners, _On the $4$-rank of class groups of quadratic fields_, Invent. Math. 167 (2007), 455-513.
  * [4] J. B. Friedlander, H. Iwaniec, _Opera de Cribro_ , 57 American Mathematical Society Colloquium Publications.
  * [5] J. B. Friedlander, H. Iwaniec, _Hyperbolic prime number theorem._ Acta Math. 202 (2009), no. 1, 1?19.
  * [6] C. Hooley, _On the number of divisors of quadratic polynomials_ , Acta. Math. 110 (1963), 97-114.
  * [7] K. Lapkova, _Explicit upper bound for the average number of divisors of irreducible quadratic polynomials_ , Monatsh. Math. (4) 186 (2018), 663-673.
  * [8] J. Li, _A binary quadratic Titchmarsh divisor problem_ , Acta. Arith. (4) 192 (2020), 341-361.
  * [9] A. B. Miller, _Asymptotics for the number of simple $(4a+1)$-knots of genus 1_, arXiv:1905.04369 [math.NT].
  * [10] H. Montgomery, _Ten Lectures on the Interface between Analytic Number Theory and Harmonic Analysis_ ,
  * [11] H. Nagoshi, _The moments and statistical distribution of class numbers of quadratic fields with prime discriminant_ , Lith. Math. J. 52 (2012), no. 1, 77?94.
  * [12] C. L. Siegel, _The Average Measure of Quadratic Forms With Given Determinant and Signature._ Annals of Mathematics, 45 (1944), no. 4, 667?685.