                                              ALMOST ALL QUADRATIC TWISTS OF AN ELLIPTIC CURVE
                                                          HAVE NO INTEGRAL POINTS

                                                                     TIM BROWNING AND STEPHANIE CHAN

                                                 Abstract. For a given elliptic curve E in short Weierstrass form, we show that almost
                                                 all quadratic twists ED have no integral points, as D ranges over square-free integers
                                                 ordered by size. Our result is conditional on a weak form of the Hall–Lang conjecture
                                                 in the case that E has partial 2-torsion. The proof uses a correspondence of Mordell
                                                 and the reduction theory of binary quartic forms in order to transfer the problem to
                                                 counting rational points of bounded height on a certain singular cubic surface, together
arXiv:2401.04375v1 [math.NT] 9 Jan 2024




                                                 with extensive use of cancellation in character sum estimates, drawn from Heath-Brown’s
                                                 analysis of Selmer group statistics for the congruent number curve.




                                                                                      Contents
                                            1. Introduction                                                                                    1
                                            2. Main results and moments                                                                        4
                                            3. Counting points on a cubic surface                                                              6
                                            4. Integral points on quadratic twists with large gcd(x, D)                                       10
                                            5. Integral points on quadratic twists with small gcd(x, D)                                       11
                                            6. Character sum input                                                                            17
                                            7. Quadratic twists with full two-torsion                                                         23
                                            8. Quadratic twists with partial two-torsion                                                      31
                                            References                                                                                        37


                                                                                 1. Introduction
                                             Given an elliptic curve defined over Z, the aim of this paper is to establish the paucity of
                                          quadratic twists that contain integral points. Fixing A and B such that 4A3 + 27B 2 6= 0,
                                          let E denote the elliptic curve y 2 = x3 + Ax + B. We shall consider the quadratic twist
                                          family
                                                                          ED : y 2 = x3 + AD 2 x + BD 3 ,                           (1.1)
                                          as D runs over square-free integers. Let D := {D ∈ Z square-free} and let
                                                                           D(N) := {D ∈ D : |D| ⩽ N},
                                          for any N ⩾ 1. Denote the set of integral points on ED by
                                                               ED (Z) := {(x, y) ∈ Z2 : y 2 = x3 + AD 2 x + BD 3 }.
                                          If E has a rational 2-torsion point and α is an integer root of the polynomial x3 + Ax + B,
                                          then every twist ED has an integral point (αD, 0). Accordingly, we define
                                                                               ∗
                                                                              ED (Z) := ED (Z) \ ED [2],                                    (1.2)
                                          where ED [2] is the 2-torsion subgroup of ED (Q). Granville [13] has conjectured asymp-
                                          totics for the density of elliptic curves that have a non-trivial integral point in a quadratic
                                            Date: January 10, 2024.
                                            2010 Mathematics Subject Classification. 11D45 (11D25, 11G05).
                                                                                            1
2                          TIM BROWNING AND STEPHANIE CHAN

twist family. (However, care should be taken when comparing the conjecture against our
setting, since he considers the model Dy 2 = x3 + Ax + B, which contains fewer integral
points than ED .) In our setting, we expect that
                                                                 1
                                       ∗
                         #{D ∈ D(N) : ED (Z) 6= ∅} ∼ cA,B N 2 ,
as N → ∞, for some constant cA,B > 0 depending only on A and B. Our main goal
is to show that the left hand side is o(N). Chan [7] has achieved this for the quadratic
twist family of congruent number curves y 2 = x3 − D 2 x. Moreover, for a fixed square-free
integer k 6= 1, Chan [8] has also proved that almost all elliptic curves in the cubic twist
family of Mordell curves y 2 = x3 + kD 2 have no integral point.
   In the setting of quadratic twists of an arbitrary elliptic curve y 2 = x3 + Ax + B, we
shall need to work under the following hypothesis when the curve has partial 2-torsion.
Conjecture 1.1 (weak Hall–Lang). Let E be the elliptic curve y 2 = x3 + Ax + B, where
A, B ∈ Z are such that 4A3 +27B
                            
                                2
                                  6= 0, and let (x, y) ∈ E(Z). Then there exists constants
                                         1     1
C, ε > 0 such that |x| ⩽ exp C max{|A| 2 , |B| 3 }1−ε .

  The Hall–Lang conjecture is recorded by Lang [22] and predicts that a polynomial bound
should hold. Thus the conjecture states that there exist constants C, κ > 0 such that
                                  |x| < C max{|A|, |B|}κ.
Note that the analogue of this conjecture over Fq (t) is known, thanks to Schmidt [25].
Over Q, on the other hand, we only have the exponential bound
                                               1      1
                                                             
                                                         6+ε
                         |x| ⩽ exp Cε max{|A| , |B| }
                                                2      3       ,
for any ε > 0, which follows from work of Hajdu and Herendi [14].
   We are now ready to reveal our main result.
Theorem 1.2. Let ε > 0. Let A, B ∈ Z such that 4A3 + 27B 2 6= 0, and let ED be given
by (1.1). Assume that Conjecture 1.1 holds. Then
                       1
                                             ∗                   N
                    N 2 ≪ #{D ∈ D(N) : ED      (Z) 6= ∅} ≪          1    ,
                                                            (log N) 8 −ε
where the implied constants depend at most on A, B and ε. Moreover, Conjecture 1.1 is
only required in the proof of the upper bound, and only then when x3 +Ax+B has precisely
one root over Q.
  When the underlying curve E1 does not have rational two torsion, so that ED [2] = ∅,
not only is our work completely unconditional, but the upper bound holds with 13 instead
of 81 . A detailed summary of our results is presented in Section 2, which we shall build
                               ∗
on to address moments of #ED     (Z). For comparison, for the full family of elliptic curves,
Alpöge [1] has shown that the average number of integral points on elliptic curves ordered
by height is bounded (by at most 66). More recently, Alpöge and Ho [2] have shown that
the second moment is also bounded in the family of all elliptic curves. Restricting to the
setting of quadratic twist families, we will apply recent work of Smith [28] to assess higher
moments of #ED (Z) in the case that ED [2] = ∅.
Theorem 1.3. Let A, B ∈ Z such that x3 + Ax + B is irreducible over Q. Then, for any
positive integer k ⩽ log log log N, we have
                               1     X                   1
                                          #ED (Z)k ≪         1 ,
                           # D(N)                    (log N) 4
                                   D∈D(N )

where the implied constant depends at most on A and B.
                          QUADRATIC TWISTS OF AN ELLIPTIC CURVE                                     3

   Let us proceed by summarising our approach to Theorem 1.2. Our argument differs
according to the size of gcd(xP , D) = gP , say, where P = (xP , yP ) ∈ ED (Z). When gP is
large we shall reduce to a question about the solubility of x3 + Ax + B modulo gP . When
x3 + Ax + B is irreducible over Q, the Chebotarev density theorem will allow us to control
the density of primes p for which x3 + Ax + B has a root modulo p. Alternatively, when
x3 + Ax + B is reducible over Q, we shall reduce to a question about the solubility of a
system of equations, for which character sum estimates will prove crucial.
   When gP is small, on the other hand, our approach makes crucial use of a construction
by Mordell [24, Chapter 25], which associates a binary quartic form fP ∈ Z[x1 , x2 ] to any
point P ∈ ED (Z). Building on the discriminant-lowering procedure adopted for binary
cubic forms in [8], we will use the reduction theory of binary quartic forms, as explained
by Cremona [9], in order to lower the discriminant of fP . This will ultimately allow us to
reduce the problem to counting rational points of bounded height on a certain singular
cubic surface, which may be of independent interest.
  Let C ∈ Z[x1 , x2 ] be a separable binary cubic form and let S ⊂ P3 be the cubic surface
                                         C(x1 , x2 ) = x23 x4 .                                 (1.3)
This is a singular cubic surface containing six lines, and with an isolated singularity
(0 : 0 : 0 : 1) of type D4 . The Manin conjecture [11] makes a precise prediction for the
asymptotic behaviour of the quantity
                            N(U; B) = # {x ∈ U(Q) : H(x) ⩽ B} ,
as B → ∞, where H is standard height function on P3 (Q) and U is the Zariski open
subset formed by deleting the six lines from S. A crude form of the conjecture predicts
linear growth, so that N(U; B) = OS (B 1+ε ), for any ε > 0.
   When the cubic form factorises as C(x1 , x2 ) = x1 x2 (x1 + x2 ), the surface S has been
studied by Browning [4], who established that
                              B(log B)6 ≪ N(U; B) ≪ B(log B)6 .
This was later upgraded to an asymptotic formula for N(U; B) by Le Boudec [23]. For
Theorem 2.1 we shall need to study S for any separable binary cubic form C. In fact, it
will suffice to restrict to the locus of (x1 : x2 : x3 : x4 ) ∈ S(Q) for which gcd(x1 , x2 , x4 ) = 1,
as follows.
Theorem 1.4. Let C ∈ Z[x1 , x2 ] be a binary cubic form that is separable over Q. Let
N ◦ (B) be the number of (x1 , x2 , x3 , x4 ) ∈ Z4 with gcd(x1 , x2 , x4 ) = 1, x3 x4 6= 0, and
|xi | ⩽ B, such that (1.3) holds. Then
                                B ≪ N ◦ (B) ≪ B(log B)max{λ,2} ,
where λ is the number of irreducible factors of C over Q, and the implied constant depends
at most on C.
   The condition x3 x4 6= 0 places us on the open set U, so that N ◦ (B) ⩽ N(U; B). The
condition gcd(x1 , x2 , x4 ) = 1 corresponds to counting integral points on S \ D, with codi-
mension 2 boundary divisor (0 : 0 : 1 : 0). This counting problem admits an interpretation
through work of Chambert-Loir and Tschinkel [6].
   Our method of proof is based on viewing the equation (1.3) as a congruence modulo
 2
x3 and relies crucially on the particular coprimality condition that is assumed of the
solutions. When C is irreducible we have N(S; B) = N(U; B) + O(1), since then none of
the six lines are defined over Q, and our work implies that N(S; B) ≫ B. In this case it
would be interesting to have a proof of the corresponding upper bound N(S; B) ≪ B.
4                             TIM BROWNING AND STEPHANIE CHAN

Acknowledgements. The authors are grateful to Roger Heath-Brown for useful com-
ments. The first author was supported by FWF grant P 32428-N35.
                               2. Main results and moments
  Let A, B ∈ Z such that 4A3 + 27B 2 6= 0, and let ED be given by (1.1). We recall the
                     ∗
definition (1.2) of ED (Z). In this section we summarise our various results, which differ
according to the factorisation properties of x3 + Ax + B. The following three results will
be deduced in Sections 5.4, 7 and 8, respectively.
Theorem 2.1. Assume that x3 + Ax + B is irreducible over Q. Then
                 1                                                1
              N 2 ≪ #{D ∈ D(N) : ED (Z) 6= ∅} ≪ N(log N)− 3 log log N,
where the implied constants depend at most on A and B.
Theorem 2.2. Let ε > 0. Assume that x3 + Ax + B has three distinct roots over Q. Then
                       1                                              1
                                         ∗
                     N 2 ≪ #{D ∈ D(N) : ED (Z) 6= ∅} ≪ N(log N)− 8 +ε ,
where the implied constants depend at most on A, B and ε.
Theorem 2.3. Assume that x3 + Ax + B factors as (x − r)Q(x), for some r ∈ Q and a
polynomial Q that is irreducible over Q. Assume that either Q(r) < 0, or Q(r) ∈ Q2 , or
else that Conjecture 1.1 holds. Then
                1                                                 1
                                   ∗
              N 2 ≪ # {D ∈ D(N) : ED (Z) 6= ∅} ≪ N(log N)− 8 log log N,
where the implied constants depend at most on A and B.
  Assume that Q(r) > 0 and Q(r) ∈   / Q2 . Then, as we shall see in Section 8, we shall also
be able to give an unconditional proof of the upper bound
                                                           49 
                           / Q2 or gcd(x, D) < N(log N)− 4
                  x · Q(r) ∈                                                    1
# D ∈ D(N) :                                                      ≪ N(log N)− 8 log log N,
                  for some (x, y) ∈ ED (Z)
where the implied constant depends at most on A and B.
  Turning to moments, Theorem 1.3 is a straightforward consequence of the following
                                     ∗
general statement about moments of #ED (Z).
Theorem 2.4. Suppose that
                                         ∗
                           #{D ∈ D(N) : ED (Z) 6= ∅} ≪ N(log N)−κ ,
for some κ > 0, where the implied constant depends at most on A, B and κ. Then for any
positive integer k ⩽ log log log N and any ε > 0, we have
                              1     X
                                             ∗
                                         #ED   (Z)k ≪ (log N)−κ+ε ,
                          # D(N)
                                    D∈D(N )

where the implied constants depend at most on A, B, κ and ε.
  We obtain Theorem 1.3 by applying Theorem 2.1 in Theorem 2.4, with κ = 13 − 24  1
                                                                                    and
     1
ε = 24 . Theorem 2.4 will be a consequence of Hölder’s inequality and the following two
results. The first is a special case of recent work by Smith [28, Theorem 1.1].
Theorem 2.5 (Smith). Let A, B be integers such that 4A3 + 27B 2 6= 0, and let ED be
given by (1.1). Then there are real numbers C, C ′ > 0, depending only on A, B, such that
for any m > 0 and N > C satisfying m < C ′ log log log N, we have
                       1      X
                                    exp(m rank ED (Q)) ⩽ exp(Cm2 ).
                    # D(N)
                                D∈D(N )
                            QUADRATIC TWISTS OF AN ELLIPTIC CURVE                              5

  The second ingredient we require is a straightforward consequence of a result by Hindry
and Silverman [20, Theorem 0.7].
Theorem 2.6. Let A, B be integers such that 4A3 + 27B 2 6= 0, and let ED be given by
(1.1) for D ∈ D. Then there exists an absolute constant c such that
                             #ED (Z) ⩽ cω(gcd(A,B))+(1+rank ED (Q))σED ,
where
                                         log |discriminant of ED |
                                 σED =
                                           log |conductor of ED |
is the Szpiro ratio of E/Q.
Proof. If y 2 = x3 + AD 2 x + BD 3 gives a quasi-minimal model, so that any p4 | AD 2
implies that p6 ∤ BD 3 , then the claim is immediate from [20, Theorem 0.7]. Otherwise,
the model y 2 = x3 + AD 2 x + BD 3 is not quasi-minimal. Since D ∈ D is assumed to be
square-free, any prime that satisfies both p4 | AD 2 and p6 | BD 3 must divide A and B.
Let S be the set of primes dividing both A and B. Suppose that C is the largest integer
satisfying both C 4 | AD 2 and C 6 | BD 3 , then any prime dividing C must be in S. If
(x, y) ∈ Z2 satisfies y 2 = x3 + AD 2 x + BD 3 , then ( Cx2 , Cy3 ) gives an S-integral point on
the quasi-minimal model
                                            AD 2      BD 3
                                 y 2 = x3 + 4 x +             .
                                             C         C6
Therefore the result follows from [20, Theorem 0.7].                                           
Proof of Theorem 2.4. The discriminant of ED in (1.1) is −16(4A3 + 27B 2 )D 6 and the
conductor is divisible by primes dividing the discriminant. Within a quadratic twist
family, since D ∈ D is a square-free, we deduce that the Szpiro ratio is
                                        2 log 16|4A3 + 27B 2 |
                            σED ⩽ 6 +                          .
                                                log |D|
Thus σ = supD∈D {σED } ≪ 1, for an implied constant that only depends on A and B.
  We shall apply Hölder’s inequality with p, q > 1 such that p1 + 1q = 1. This yields
                                                                              q1
          X                                               1      X
                  ∗
               #ED  (Z)k ⩽ #{D ∈ D(N) : ED    ∗
                                                (Z) 6= ∅} p        #ED (Z)qk  .
        D∈D(N )                                                    D∈D(N )

Applying Theorem 2.6 and the assumption of the theorem, it follows that
                                                                         1q
                                         p1
            X
                     ∗             N                X
                 #ED   (Z)k ≪                 ck1    (cqkσ )rank ED (Q)  ,
                                (log N)κ
             D∈D(N )                                     D∈D(N )

where c1 = cω(gcd(A,B))+σ and the implied constant depends on A and B. We now apply
Theorem 2.5 with m = qkσ log c. Since k ⩽ log log log N, by assumption, we have m ≪
log log log N if we assume that q ≪ 1. This gives
                                                            2
                                X
                                        ∗    k     Nck1 cqk
                                                         2
                                      #ED (Z) ≪             κ ,

                              D∈D(N )
                                                  (log N)   p



where c2 = exp(C(σ log c)2 ). We now specify the choice of p, q by imposing q = 1ε . Since
k ⩽ log log log N, this leads to
                 X
                           ∗             N
                             (Z)k ≪                                         2
                                                                              
                       #ED                        · exp C ε (log log log N)     ,
                                    (log N)(1−ε)κ
                  D∈D(N )
6                            TIM BROWNING AND STEPHANIE CHAN

for a suitable constant Cε depending on A, B and ε. The statement of the theorem easily
follows, on redefining ε.                                                            

                        3. Counting points on a cubic surface
3.1. Preliminaries. We begin by examining some properties of a binary cubic form
C, which we assume to be separable over Q and such that C(1, 0) 6= 0. Denote the
discriminant of C by ∆(C). Henceforth we allow all implied constants to depend on the
coefficients of C. Since C is separable over Q, there exist binary linear forms L1 , L2 , L3 ∈
Q[y1 , y2 ] such that C = L1 L2 L3 , with no two factors proportional. We have the following
simple result.
Lemma 3.1. Assume that y = (y1 , y2) ∈ Z2 such that |L1 (y)| ⩽ |L2 (y)| ⩽ |L3 (y)|. Then
L2 (y) ≫ |y| and L3 (y) ≪ |y|.
Proof. The upper bound is trivial. To see the lower bound, on renormalising and possibly
interchanging the roles of y1 , y2, we may assume without loss of generality that y1 = 1
and y2 = t for t ∈ [−1, 1]. Let li (t) = Li (1, t) for 1 ⩽ i ⩽ 3. Thus there exist non-zero
αi , βi ∈ Q such that
                                       li (t) = αi + βi t,
with αi βj − αj βi 6= 0. We wish to prove that l2 (t) ≫ 1, where the implied constant is
allowed to depend on the constants αi , βi . We suppose for a contradiction that, for any
positive integer n, there exists tn ∈ [−1, 1] such that |l2 (tn )| < 1/n. Then it follows that
                               β1 l2 (tn ) = β1 α2 − α1 β2 + β2 l1 (tn ).
Since |l1 (tn )| ⩽ |l2 (tn )| < 1/n, this therefore implies that
                                                                 1
                                     0 < |β1 α2 − α1 β2 | ≪        ,
                                                                 n
which is a contradiction for sufficiently large n.                                          
  Our remaining results in this section concern the solubility of C(x, 1) and C(1, x) in
residue classes. Define a multiplicative function
                         ̺(n) := #{x ∈ Z/nZ : C(x, 1) ≡ 0 mod n}.                        (3.1)
It follows from Chebotarev density theorem and Burnside’s lemma (see for example [26,
Proposition 3.10 and Section 3.3.3.5]) that
                             X ̺(p)
                                       = λ log log N + O(1),                    (3.2)
                             p⩽N
                                   p

where λ is the number of irreducible factors of C(x, 1) over Q. It follows from Hensel
lifting that
                 ̺(p) = ̺(pv ), for any v ⩾ 1 and any prime p ∤ ∆(C).            (3.3)
We may also define
                         ̺′ (n) := #{x ∈ Z/nZ : C(1, x) ≡ 0 mod n}.                      (3.4)
It follows from work of Huxley [21] that
                                                          1
                                   ̺(pv ), ̺′ (pv ) ⩽ 3p 2 vp (∆(C)) ,                   (3.5)
for any prime power pv . We proceed by proving the following result.
                          QUADRATIC TWISTS OF AN ELLIPTIC CURVE                                       7

Lemma 3.2. Let f be any multiplicative function satisfying
                         (
                          = ̺(pv )              if p ∤ C(1, 0)∆(C),
                 f (pv )           v     ′ v
                          ∈ [0, ̺(p ) + ̺ (p )] if p | C(1, 0)∆(C).
Then we have
    X                                   X f (n)                                X f (n)
       f (n) ≍ N(log N)λ−1 ,                      ≍ (log N)λ           and                ≍ 1,    (3.6)
     n⩽N                                n⩽N
                                              n                                n⩽N
                                                                                     n2
where the implied constants depend only on C.
                                                   1
Proof. It follows from (3.5) that f (pv ) ⩽ 6p 2 vp (∆(C)) = O(1). Therefore, by [30, Satz 1],
we have                                                         !
                           X               N            X f (p)
                               f (n) ≍         exp                .                      (3.7)
                           n⩽N
                                         log N          p⩽N
                                                             p
The value of f (p) is always equal to ̺(p) unless p | C(1, 0), so
                                                                      
                   X f (p) X ̺(p)                                 ′
                                                  X       ̺(p) + ̺ (p) 
                            =           +O                              .
                   p⩽N
                         p     p⩽N
                                    p                           p
                                                       p|C(1,0)∆(C)

Since C(1, 0) 6= 0, we deduce that the sum over p | C(1, 0)∆(C) has only finitely many
terms. We now apply the estimate from (3.2), together with the trivial bound ̺(p), ̺′ (p) ⩽
p for all p | C(1, 0)∆(C). Thus it follows that
                             X f (p)
                                        = λ log log N + O(1).                          (3.8)
                             p⩽N
                                    p
The first bound in (3.6) follows from combining (3.7) and (3.8). The second and third
bounds in (3.6) can be deduced by partial summation.                               
3.2. Proof of the upper bound in Theorem 1.4. Recall our convention that all
implied constants are allowed to depend on the coefficients of C. We begin by showing
that it suffices to assume without loss of generality that C(1, 0) 6= 0 in the proof. To see
this, we first choose a ∈ Z, with a = O(1), such that C(1, a) 6= 0. But then, on making the
change of variables (x1 , x2 ) 7→ (x1 , x2 + ax1 ), we obtain a new counting problem, in which
B is replaced by 2 max{1, |a|}B ≪ B and the relevant binary cubic form has non-zero
leading coefficient.
   Consider a solution (x1 , x2 , x3 , x4 ) ∈ Z4 to (1.3). Write h21 h2 = gcd(x1 , x2 ), where h1 , h2
are positive integers and h2 is square-free. The assumption that gcd(x1 , x2 , x4 ) = 1 implies
that (h21 h2 )3 | x23 , so h31 h22 | x3 . Define
                                 x1               x2                  x3
                        y1 = 2 ,            y2 = 2 ,          u = 3 2,          v = x4 .
                               h1 h2             h1 h2               h1 h2
Then (1.3) can be rewritten as
                                              C(y1 , y2 ) = h2 u2 v.                            (3.9)
   First fix h1 , h2 and define the quantity
                                                                                        
                                                        Y ⩽ max{|y1|, |y2|} < 2Y        
       N(Y, U, V ) := # (y1 , y2 , u, v) ∈ Z4 : U ⩽ |u| < 2U, V ⩽ |v| < 2V                 ,   (3.10)
                                                         gcd(y1 , y2 ) = 1, (3.9) holds
                                                                                        

with Y, U, V in the range
                                    B                   B
                            Y <          ,    U<               ,      V < B.                     (3.11)
                                  h21 h2               h31 h22
8                           TIM BROWNING AND STEPHANIE CHAN

We shall estimate N(Y, U, V ) using the geometry of numbers, by first proving that the
equation (3.9) forces the solutions to lie on a small number of lattices.
Lemma 3.3. Let ̺ and ̺′ be given by (3.1) and (3.4), respectively. Define a multiplicative
function f via
                        
                              v
                        ̺(p )
                                          if p ∤ C(1, 0),
                   v        ′  v
               f (p ) = ̺ (p )             if p ∤ C(0, 1),                          (3.12)
                        ̺(pv ) + ̺′ (pv ) if p | gcd(C(1, 0), C(0, 1)).
                        

Then the solutions (y1 , y2) ∈ Z2 to
                                     C(y1 , y2 ) ≡ 0 mod d.
such that gcd(y1 , y2 ) = 1 are covered by at most f (d) many rank 2 lattices, each of deter-
minant d.
Proof. By the Chinese remainder theorem, it suffices to consider the case when d = pv .
Since y1 and y2 are coprime, p divides at most one of y1 and y2 . Suppose p ∤ y2 , then we
can rewrite the congruence C(y1 , y2) ≡ 0 mod pv as
                                   C(y1 /y2, 1) ≡ 0 mod pv .
Therefore the solutions (y1 , y2 ) all lie in a lattice generated by (pv , 0) and (α, 1), where
α ∈ Z is a solution to C(x, 1) ≡ 0 mod pv . Moreover, there are ̺(pv ) many choices of α
modulo pv .
   If p | y2 , then since p ∤ y1 , we must have p | C(1, 0). In this case, consider C(1, y2/y1 ) ≡
0 mod pv . Then the solutions (y1 , y2) lies in a lattice generated by (0, pv ) and (1, β), where
β ∈ Z is a solution to C(1, β) ≡ 0 mod pv .
   Therefore, the number of lattices is bounded by ̺(pv ) if p ∤ C(1, 0) and ̺(pv ) + ̺′ (pv )
if p | C(1, 0). By symmetry we obtain the statement in the lemma.                                
    Using this result we can now proved the following bound.
Lemma 3.4. Fix non-zero h2 , u ∈ Z. Then
                                                        
                         Y ⩽ max{|y1 |, |y2|} < 2Y                          
     
                      4
                                                         
                                                                    2    V
   # (y1 , y2 , v) ∈ Z : gcd(y1 , y2 ) = 1, V ⩽ |v| < 2V   ≪ f (h2 u )     +1 ,
     
                         (3.9) holds
                                                                        Y

where f is the multiplicative function defined in (3.12) and the implied constant depends
only on C.
Proof. We begin by applying Lemma 3.3 to d = h2 u2 , and proceed to bound the number
of solutions (y1 , y2 ) that lie in one of the f (d) lattices of determinant d. Note that (3.9)
has no solution unless h2 ≪ Y 3 and U ≪ Y 3/2 . By symmetry, on multiplying by 3, we
may assume that
                             |L1 (y1 , y2 )| ⩽ |L2 (y1 , y2 )| ⩽ |L3 (y1 , y2 )|.
It follows from Lemma 3.1 that any such solution must satisfy
                                              h2 U 2 V
                                     L1 (y1 , y2 ) ≪   .                       (3.13)
                                                Y2
The region in R2 cut out by max{|y1 |, |y2|} < 2Y and (3.13) can be placed inside an
ellipse R ⊂ R2 with area
                                               h2 U 2 V   h2 U 2 V
                               vol(R) ≪ Y ·             =          .
                                                 Y2          Y
                        QUADRATIC TWISTS OF AN ELLIPTIC CURVE                               9

By [17, Lemma 2], there are
                                     h2 U 2 V       V
                                  ≪           +1≪ +1
                                       dY           Y
many lattice points in the ellipse such that gcd(y1 , y2) = 1.                             
Lemma 3.5. In the notation of Theorem 1.4, we have N ◦ (B) ≪ B(log B)max{λ,2} .
Proof. Recall the definition (3.10) of N(Y, U, V ). We apply Lemma 3.4 and sum over
U ⩽ |u| < 2U. Lemma 3.2 implies that
                                     X
                                          f (|u|) ≪ U.
                                       U ⩽|u|<2U

Now it follows from combining the Chinese remainder theorem with (3.3) and (3.5) that
f (h2 u2 ) ≪ f (h2 )f (|u|). Hence we deduce that
                                                                           
                                X
                                             2    V                       V
             N(Y, U, V ) ≪            f (h2 u )     + 1 ≪ f (h2 ) · U ·     +1 .
                                                  Y                       Y
                           U ⩽|u|<2U

Note that N(Y, U, V ) = 0 unless h2 U 2 V ≪ Y 3 , so we can impose U ≪ (Y 3 /(h2 V ))1/2 .
Now summing N(Y, U, V ) over U, V, Y being powers of 2 subject to (3.11), we have
                                                      !
    X                           X V 1/2 Y 1/2    B        f (h2 )B f (h2 )B
          N(Y, U, V ) ≪ f (h2 )        1/2
                                              +  3 2
                                                        ≪         + 3 2 (log B)2 .
    U,V,Y                       Y,V  h2         h1 h2       h1 h2    h1 h2

Finally, we sum over h1 , h2 and apply Lemma 3.2 to bound
                              X f (h2 )         X f (h2 )
                                          and          2
                                                          .
                              h ⩽B
                                   h 2
                                                h ⩽B
                                                      h2
                              2                     2


This leads to the upper bound N ◦ (B) ≪ B(log B)max{λ,2} .                                 

3.3. Proof of the lower bound in Theorem 1.4.
Lemma 3.6. In the notation of Theorem 1.4, we have N ◦ (B) ≫ B.
Proof. For each positive integer x3 that is coprime to ∆(C), it follows from (3.3) and
the Chinese remainder theorem that there are ρ(x23 ) = ρ(x3 ) solutions α mod x23 to the
congruence
                                  C(x, 1) ≡ 0 mod x23 .
Each α give rise to a lattice generated by (x23 , 0) and (α, 1), which produces solutions
to C(x1 , x2 ) ≡ 0 mod x23 . In each lattice, Minkowski’s theorem implies that C(x1 , x2 ) ≡
0 mod x23 has at least one non-trivial solution (x1 , x2 ) such that x1 , x2 ≪ x3 . With such
a solution, write
                                       C(x1 , x2 ) = x23 x4 .
Then x23 x4 = C(x1 , x2 ) ≪ x33 , so x4 ≪ x3 . Varying x3 over integers between 1 and B such
that x3 is coprime to ∆(C), it follows from Lemma 3.2 that
                                         X
                                                 ρ(x3 ) ≫ B
                                      1⩽x3 ⩽B
                                  gcd(x3 ,∆(C))=1

which thereby gives the lower bound.                                                       
  Theorem 1.4 follows immediately from Lemmas 3.5 and 3.6.
10                          TIM BROWNING AND STEPHANIE CHAN

           4. Integral points on quadratic twists with large gcd(x, D)
     Fix integers A, B such that x3 + Ax + B is irreducible over Q. Define
                                ED : y 2 = x3 + AD 2 x + BD 3 ,
where D ∈ D. The discriminant of ED is
                               ∆(ED ) = −16(4A3 + 27B 2 )D 6 .
We henceforth take C to be the binary cubic form such that
                               C(x, D) = x3 + AD 2 x + BD 3 .
Note that x3 + Ax + B being irreducible implies that C is also irreducible.
Lemma 4.1. Assume that C(x1 , x2 ) ∈ Z[x1 , x2 ] is irreducible. Recall the definition of ̺
from (3.1). Then
                         X 1         2
                                   ⩽ log log N + O(1)                                 (4.1)
                         p⩽N
                                p    3
                                ̺(p)⩾1

and
                                                                       1
                           #{n ⩽ N : ̺(n) ⩾ 1} ≪ N(log N)− 3 .                        (4.2)
Proof. Since C is irreducible, the Galois group of C(x, 1) is either S3 or C3 . The density
of primes such that ̺(p) ⩾ 1 is 32 when the Galois group of is S3 , and 31 instead when
the Galois group is C3 . The first claim (4.1) is a consequence of the Chebotarev density
theorem. The second claim (4.2) follows from (4.1) and [30, Satz 1].                     

   We first show that for almost all D ∈ D, there is no integral point (x, y) ∈ ED (Z) with
large gcd(x, D).
Lemma 4.2. Let κ > 0. We have
                                               
                     gcd(x(P ), D) ⩾ N(log N)−κ                1
    # D ∈ D(N) :                                  ≪κ N(log N)− 3 log log N.
                     for some P ∈ ED (Z)

Proof. Suppose (x, y) ∈ ED (Z) is such that g := gcd(x, D) ⩾ N(log N)−κ . Write x = g x̃,
D = g D̃. Then from the equation for ED , we see that g 3 | y 2. Since D is square-free, g
must also be square-free, so g 2 | y. Write y = g 2ỹ. Then we can rewrite the equation as

                            g ỹ 2 = x̃3 + AD̃ 2 x̃ + B D̃ 3 = C(x̃, D̃).

Since D is square-free, we have that gcd(g, D̃) = 1. Thus we deduce that C(x̃/D̃, 1) ≡
0 mod g, whence ̺(g) ⩾ 1.
  Factorise |D| uniquely as a product |D| = ab, where a is the product of all prime
divisors of D such that ̺(p) ⩾ 1. Then g must be a divisor of a, so b ⩽ N/g ⩽ (log N)κ .
Using (4.2) to bound the number of a, we get that the number of possible D is bounded
by
                     X         X          X            N/b         N log log N
                2                   1≪                        1 ≪κ          1  ,
                  b⩽(log N )κ a⩽N/b    b⩽(log N )κ
                                                   (log(N/b)) 3     (log N) 3

                           ̺(a)⩾1

as claimed.                                                                              
                          QUADRATIC TWISTS OF AN ELLIPTIC CURVE                                         11

         5. Integral points on quadratic twists with small gcd(x, D)
5.1. Preliminaries. Consider a binary quartic form of the form
          f (X, Y ) = a0 X 4 + 4a1 X 3 Y + 6a2 X 2 Y 2 + 4a3 XY 3 + a4 Y 4 ,               ai ∈ Z.
The invariants of f are
                      I = I(f ) = a0 a4 − 4a1 a3 + 3a22 , and
                     J = J(f ) = a0 a2 a4 − a0 a23 − a21 a4 + 2a1 a2 a3 − a32 .
The discriminant of f is
          ∆(f ) = I 3 − 27J 2
                = a30 a34 − 64a31 a33 − 18a20 a22 a24 − 12a20 a1 a3 a24 − 6a0 a21 a23 a4
                       − 180a0 a1 a22 a3 a4 + 81a0 a42 a4 + 36a21 a22 a23 − 27(a20 a43 + a41 a24 )
                       + 54a2 (−a22 + 2a1 a3 + a0 a4 )(a4 a21 + a0 a23 ).
The seminvariants attached to the form are I, J, a = a(f ) = a0 ,
                                      H = H(f ) = a21 − a0 a2 ,
and
                            R = R(f ) = 2a31 + a20 a3 − 3a0 a1 a2 .
In particular H is the leading coefficient of the quartic covariant
      Gf (X) = (a21 − a0 a2 )X 4 + 2(a1 a2 − a0 a3 )X 3
                                                                                                     (5.1)
                    + (3a22 − a0 a4 − 2a1 a3 )X 2 + 2(a2 a3 − a1 a4 )X + (a23 − a2 a4 ),
and R is the leading coefficient of the sextic covariant of f . Comparing to the formulas
in [9, Section 4.1.1], here we have removed a factor of −48 from H and the quartic
covariant, a factor of 32 from R, a factor of 12 from I, a factor of 432 from their J, and
a factor of 256 · 27 from ∆.
   Given γ = ( ac db ) ∈ SL2 (Z), define γ · (X, Y ) = (aX + bY, cX + dY ) and
                  (γ · f )(X, Y ) = f (γ · (X, Y )) = f (aX + bY, cX + dY ).
Furthermore, define the action of γ ∈ SL2 (Z) on (f, (α, β)) by
                               γ · (f, (α, β)) = (γ · f, γ −1 · (α, β)),                             (5.2)
and observe that the value of f (α, β) is preserved under this action.
5.2. Quartic forms associated to integral points. Given P = (x0 , y0 ) ∈ ED (Z), we
may write down a corresponding quartic form
               fP (X, Y ) = X 4 − 6x0 X 2 Y 2 + 8y0 XY 3 + (−4AD 2 − 3x20 )Y 4 .                     (5.3)
Here ∆(f ) = ∆(ED ) = −16(4A3 + 27B 2 )D 6 , I(f ) = −4AD 2 and J(f ) = −4BD 3 . This
construction is due to Mordell [24, Chapter 25]. (See also [2, Section 2.2].)
Lemma 5.1. Suppose P = (x0 , y0 ) ∈ ED (Z). Let M be any integer such that M | D and
gcd(M, 2x0 ) = 1. Take any integer k such that k ≡ y0 x−1
                                                       0 mod |M|. Then
                                         1
                           FP (X, Y ) = 3 fP (MX + kY, Y )                      (5.4)
                                        M
is integral and satisfies
      • FP (1, 0) = M;
      • I = −4A(D/M)2 and J = −4B(D/M)3 ;
      • ∆(F ) = ∆(f )/M 6 = −16(4A3 + 27B 2 )(D/M)6 .
12                            TIM BROWNING AND STEPHANIE CHAN

Proof. It suffices to show that there exists an integer k ≡ y0 x−1   0 mod |M| such that the
properties of FP hold, because any other choice of k would simply transform FP by
( 01 ∗1 ) ∈ SL2 (Z), which preserves the integrality of FP and its invariants.
    Since M | D, we have y02 ≡ x30 + AD 2 x0 mod |M|3 from the equation for ED . If
k ≡ y0 x−1                                −1 2     2
            0 mod |M|, then x0 ≡ (y0 x0 ) ≡ k mod |M|. By Hensel lifting, there exists
                              −1
some k such that k ≡ y0 x0 mod |M| and
                                          x0 ≡ k 2 mod |M|3 ,                                   (5.5)
provided M is odd. Now since y0 ≡ kx0 ≡ k 3 mod |M| and y02 ≡ x30 ≡ k 6 mod |M|2 , we
deduce that y0 ≡ k 3 mod |M|2 . Then, on solving
                (k 3 + λM 2 )2 ≡ y02 ≡ x30 + AD 2 x0 ≡ k 6 + AD 2 k 2 mod |M|3 ,
for λ ∈ Z/MZ, we see that
                                          AD 2
                                       y0 ≡ k 3 +
                                               mod |M|3 .                                       (5.6)
                                           2k
Using (5.5) and (5.6), we can check that the new quartic form
                1
 FP (X, Y ) =      fP (MX + kY, Y )
               M3
                                   6(k 2 − x0 ) 2 2
             = MX 4 + 4kX 3 Y +                 X Y                                       (5.7)
                                        M
                    4(k 3 − 3x0 k + 2y0)      3   k 4 − 6x0 k 2 + 8y0 k − 4AD 2 − 3x20 4
                  +                      XY     +                                     Y ,
                             M2                                    M3
is integral and has all the claimed properties.                                              
Lemma 5.2. Fix A, B ∈SZ such that 4A3 + 27B 2 6= 0. Fix a choice of integer M |
     D
gcd(2x(P ),D)
              , for every P ∈ D∈D ED (Z). Then the map from
                                           [
                                      P ∈     ED (Z)
                                                    D∈D

to
                                          (FP , (1, 0))/ SL2 (Z),
with FP as defined in (5.4) and the SL2 (Z)-action as defined in (5.2), is well-defined and
injective.
Proof. We first prove that the map is well-defined. Given P ∈ ED (Z) with the prescribed
choice of M, suppose k and k ′ are two choices of integer such that k ≡ k ′ ≡ y0 x−1
                                                                                  0 mod |M|,
so k ′ = k + bM for some b ∈ Z. Then, with such choices, the corresponding FP is
                      1                                                  1
      F ′ (X, Y ) =     3
                          fP (MX + k ′ Y, Y )        and   F (X, Y ) =      fP (MX + kY, Y ).
                      M                                                  M3
But                                                
                                   ′            1 b
                                (F , (1, 0)) =        · (F, (1, 0)),
                                                0 1
so (F ′ , (1, 0)) and (F, (1, 0)) are in the same SL2 (Z)-equivalence class. Therefore we have
checked that the image (FP , (1, 0)) does not depend on the choice of k, so the map is
well-defined.                                                     S
  We now prove that the map is injective. Suppose P, Q ∈ D∈D ED (Z) are such that
                                  (FP , (1, 0)) = γ · (FQ , (1, 0)).                            (5.8)
                          QUADRATIC TWISTS OF AN ELLIPTIC CURVE                               13

The condition that (1, 0) = γ −1 · (1, 0) implies that the first column of γ must be (1, 0),
and so                                            
                                               1 b
                                         γ=
                                               0 1
for some b ∈ Z, since γ ∈ SL2 (Z) must have determinant 1. Putting this back into (5.8),
we have
                      FP (X, Y ) = (γ · FQ )(X, Y ) = FQ (X + bY, Y ).                (5.9)
Observe from the properties given in Lemma 5.1 that FP (1, 0) = FQ (1, 0) determines M,
and J(FP ) = J(FQ ) determines D/M, so it must be that P, Q ∈ ED (Z) for the same
D ∈ D. Write
               1                                               1
 FP (X, Y ) = 3 fP (MX + kP Y, Y ) and FQ (X, Y ) = 3 fQ (MX + kQ Y, Y ), (5.10)
              M                                               M
where kP , kQ ∈ Z and M = FP (1, 0) = FQ (1, 0).
   Combining (5.10) and (5.9), we have
                        fP (MX + kP Y, Y ) = fQ (M(X + bY ) + kQ Y, Y ).
On replacing X by (X − kP Y )/M, we deduce that
                          fP (X, Y ) = fQ (X + (bM + kQ − kP )Y, Y ).                     (5.11)
                    3
Recall that the X Y -coefficients of fP and fQ are 0 by construction. Comparing the
X 3 Y -coefficients on the two sides of (5.11), we have
                                      bM + kQ − kP = 0.
Therefore fP (X, Y ) = fQ (X, Y ), and hence P = Q.                                           
5.3. Bounding the number of equivalence classes of quartic forms. We apply
Lemma 5.2 with
                                               D
                                   M=                   ,
                                         gcd(2x(P ), D)
                 S                                                    S
for every P ∈ D∈D ED (Z). To bound the size of the image of D∈D(N ) ED (Z) with
gcd(x(P ), D) ⩽ N(log N)−κ , we bound the number of SL2 (Z)-equivalence classes of binary
quartic forms F that can arise, and we will bound separately the number of solutions
(α, β) ∈ Z2 to the Thue inequality |F (α, β)| ⩽ N/G, that comes from placing a dyadic
interval of length G around gcd(x(P ), D).
   To bound the number of SL2 (Z)-equivalence classes of binary quartic forms, we appeal
to reduction theory, which allows us to choose a representative in each SL2 (Z)-equivalence
class with bounded seminvariants. In doing so, we will make use of the following bounds
taken from work of Cremona [9].
Lemma 5.3 ([9, Propositions 11 and 14]). Every integral binary quartic form F with
non-zero discriminat is SL2 (Z)-equivalent to a form Fred with seminvariants in the range
                                          1
              a(Fred ) ≪ |φ| + |I(Fred )| 2   and    H(Fred ) ≪ |φ|2 + |I(Fred )|,
where φ denotes the real root of X 3 − I(F
                                         4
                                           )
                                             X − J(F
                                                   4
                                                     )
                                                       with the largest absolute value.
  We now reduce the problem about counting SL2 (Z)-equivalence classes of quartic forms
to a problem about counting points on a cubic surface.
Lemma 5.4. The number of SL2 (Z)-equivalence classes of FP in the image of
                           {P ∈ ED (Z) : D ∈ D, gcd(x(P ), D) < G}
is bounded by the number of (h, a, r, g) ∈ Z4 , where g is a positive square-free integer, and
                                        h, a, r, g ≪A,B G,                                (5.12)
14                           TIM BROWNING AND STEPHANIE CHAN

such that
                              h3 + Aa2 h + Ba3 = r 2 g.                                     (5.13)
Furthermore we can assume that r 6= 0 with OA,B (G(log G)6 )-many exceptions.
Proof. For P = (x0 , y0) ∈ ED (Z), write g = gcd(2x0 , D), so that D = Mg. Reduce every
F = FP to an integral binary quartic form Fred with seminvariants in the bounded range
given in Lemma 5.3. It follows from Lemma 5.1 that I(F ) = −4Ag 2 and J(F ) = −4Bg 3 .
Take φ1 to be the real root of X 3 + AX + B with the largest absolute value. Then φ = φ1 g
is the real root of
                             1          1
                      X 3 − I(F )X − J(F ) = X 3 + Ag 2 X + Bg 3
                             4          4
with largest absolute value. Since φ ≪A,B g, Lemma 5.3 implies that
                          a(Fred ) ≪A,B g     and    H(Fred ) ≪A,B g 2 .                    (5.14)
  To count the number of F/ SL2 (Z), it suffices to count the number of possible tuples
(I, J, a, H, R) taken by Fred , such that the tuple satisfies the syzygy
                                                        2
                                   3   I 2      J 3      R
                                 H − a H− a =                  ,                 (5.15)
                                       4        4         2
where (I, J, a, H, R) = (I(Fred ), J(Fred ), a(Fred ), H(Fred), R(Fred )). Plugging in I(Fred ) =
I(F ) = −4Ag 2 and J(Fred ) = J(F ) = −4Bg 3 , (5.15) becomes
                                                            2
                               3       2 2            3 3     R
                            H + Ag a H + Bg a =                    .                      (5.16)
                                                              2
   We can check, by putting (5.7) into (5.1), that
                         4                    2
  GF (X) = x0 X 4 + (−y0 + x0 k)X 3 + 2 (2AD 2 + 3x20 + 3x0 k 2 − 6y0 k)X 2
                        M                    M
                   4
              + 3 (AD 2 k + 3x20 k − x0 y0 + x0 k 3 − 3y0 k 2 )X
                 M
                   1
              + 4 (−4Ax0 D 2 + 4AD 2 k 2 − 3x30 + 6x20 k 2 − 4x0 y0 k + x0 k 4 + 4y02 − 4y0 k 3 ).
                 M
Every coefficient of GF (X) is divisible by g, so g | GF (X). Then we also know that
g | GFred (X) because GF is a covariant of F . Hence H, being the leading coefficient of
GFred (X), must also be divisible by g. The left hand side of (5.16) is integral, so R must
                                                 2
be even. From (5.16), we deduce that g 3 | R2 , so g 2 | R2 since g is square-free. Therefore,
on writing H = gh and R2 = g 2 r, we see that (5.16) becomes (5.13). The bounds (5.14)
on the variables becomes
                                  a ≪A,B g and h ≪A,B g.
When g < 2G, this implies that (h, a, r, g) satisfies (5.12). Since (h, a, r, g) determines
(I, J, a, H, R), it suffices to bound the number of such (h, a, r, g).
   If r = R = 0, then (H, 12 R) is a torsion point in Ega (Z), so ga | H. Writing Fred (X, Y ) =
a0 X 3 + a1 X 2 Y + a2 XY 3 + a3 Y 3 , we have ga0 | H = a21 − a0 a2 , hence a0 | a21 . Since a0 or
a21 divides every term in the formula of ∆(Fred ), we see that a0 | ∆(Fred ) = −16(4A3 +
27B 2 )g 6. Given each g, the number of possible a = a0 is ≪A,B 7ω(g) . P            There are at
most 3 torsion point in Ega (Z), so the contribution of such forms is ≪A,B g≪G 7ω(g) ≪
G(log G)6 .                                                                                       
  We record the following upper bound, due to Thunder [29], which allows us to count
the number of solutions to Thue inequalities.
                          QUADRATIC TWISTS OF AN ELLIPTIC CURVE                            15

Lemma 5.5. Suppose that F (X, Y ) is an integral binary form with non-zero discriminant.
Then for any positive integer m, we have
                                                                     2
                          #{(X, Y ) ∈ Z2 : |F (X, Y )| ⩽ m} ≪ m deg(F ) ,
where the implied constant only depends on the degree deg(F ) of F .
Proof. To apply [29, Theorem 2], it suffices to check that the area
                            AF = vol{(X, Y ) ∈ R2 : |F (X, Y )| ⩽ 1}
is finite. The finiteness of AF follows from work of Bean [3, Corollary 1].                
  We are now ready to bound the contribution from integral points (x, y) ∈ ED (Z) with
small gcd(x, D).
Lemma 5.6. For any K ⩾ 1, we have
                                                         1
           X
                #{P ∈ ED (Z) : gcd(x(P ), D) < K} ≪ (NK) 2 (log K)ν ,
                D∈D(N )

where ν is 3 when ED [2] is trivial over Q and 6 otherwise.
Proof. We split the sum S into dyadic intervals according to the size of gcd(x(P ), D). Con-
sider the points P ∈ D∈D(N ) ED (Z) such that G ⩽ gcd(x(P ), D) < 2G.
   It follows from Lemma 5.2 that we want to bound the number of SL2 (Z)-equivalence
classes of (FP , (1, 0)) from such P . Given any integral binary quartic form F , we can
collect all FP that are SL2 (Z)-equivalent to F , which we write as FP ∼SL2 (Z) F . This
allows us to transform (FP , (1, 0)) into (F, (α, β)), where (α, β) ∈ Z2 . Then, since
                                                             D
                          F (α, β) = FP (1, 0) = M =                   ,
                                                        gcd(2x(P ), D)
we see that (α, β) satisfies |F (α, β)| ⩽ N/G. By Lemma 5.5, the number of solutions to
the inequality |F (X, Y )| ⩽ N/G is ≪ (N/G)1/2 . Therefore, given any F , we have the
upper bound
                                                                   1/2
        X                                                          N
              #{P ∈ ED (Z) : FP ∼SL2 (Z) F, gcd(x(P ), D) ⩾ G} ≪         .       (5.17)
                                                                   G
      D∈D(N )

   Next we bound the S number of SL2 (Z)-equivalence classes of F that can arise as the
image of some P ∈ D∈D ED (Z). By Lemma 5.4, it suffices to count (h, a, r, g) ∈ Z4 such
that g is square-free, h, a, g, r ≪ G and h3 + Aa2 h + Ba3 = gr 2. First suppose that r 6= 0.
Since g is square-free, it must be that b := gcd(h, a, g) | r. Hence we can bound the number
of (h/b, a/b, r/b, g/b) using Theorem 1.4, because gcd(h/b, a/b, g/b) = 1. Summing over
b ⩽ G, we thereby obtain
                                                                   XG
                          4   g square-free, h, a, g, r ≪ G
     # (h, a, r, g) ∈ Z : 3                                       ≪        (log G)max{λ,2}
                              h + Aa2 h + Ba3 = gr 2, r 6= 0             b
                                                                     b⩽G

                                                                  ≪ G(log G)max{λ,2}+1 .
If ED has non-trivial two torsion, then we also have to include O(G(log G)6 )-many excep-
tions to account for the possibility that r = 0. Therefore the number of SL2 (Z)-equivalence
classes in                 [
                              {FP : P ∈ ED , gcd(x(P ), D) < 2G}
                            D∈D
                              ν
is bounded by ≪ G(log G) .
16                            TIM BROWNING AND STEPHANIE CHAN

     Summing (5.17) over the O(G(log G)ν )-many SL2 (Z)-equivalence classes of F , we have
                                                                                            12
          X
                                                                                ν       N
                   #{P ∈ ED (Z) : G ⩽ gcd(x(P ), D) < 2G} ≪ G(log G)
                                                                                        G          (5.18)
         D∈D(N )
                                                                        1
                                                              = (NG) (log G)ν .
                                                                        2



Finally, summing over G being powers of 2 and subject to 1 ⩽ G < K, gives the desired
result.
                                                                                   

Remark 5.7. Heuristically, we expect the set {(X, Y ) ∈ Z2 : |F (X, Y )| ⩽ m} considered
                                    2
in Lemma 5.5 to have size ∼ AF m deg(F ) , where
                                                                                    1
               AF = vol{(X, Y ) ∈ R2 : |F (X, Y )| ⩽ 1} ≪ ∆(F )− deg(F )(deg(F )−1) ,

by [3, Corollary 1]. When F is of degree 4 with discriminant ∆(F ) = −16(4A3 + 27B 2)g 6 ,
                                           1  1           1  1
this gives an upper bound of ≪ ∆(F )− 12 m 2 ≪A,B g − 2 m 2 . Such a bound would re-
                        1                               1
place (5.17) by (N/G2 ) 2 , and replace (5.18) by ≪ N 2 (log G)ν . Summing over dyadic
intervals of length G ⩽ N would then give
                                                  1
                              X
                                   #ED (Z) ≪ N 2 (log N)ν+1 .
                               D∈D(N )

However, in general, we cannot expect to be able to prove strong point-wise bounds of
                    2
the form ≪ AF m deg(F ) on the number of solutions to Thue inequalities when m is small
relative to ∆(F ). As we will see in Lemma 5.8, there are infinitely many integral points
in the family ED , which implies that there are integral binary quartic forms fP taking the
form (5.3) with arbitrary large ∆(fP ), and fP (1, 0) = 1 .

5.4. Completing the proof of Theorem 2.1. Taking K = N(log N)−κ in Lemma 5.6,
we obtain
                                                                       1
          X
              #{P ∈ ED (Z) : gcd(x(P ), D) < N(log N)−κ } ≪ N(log N)3− 2 κ .
           D∈D(N )

The upper bound in Theorem 2.1 therefore follows from combining this with Lemma 4.2,
on taking κ = 7. The lower bound is achieved in the following result.

Lemma 5.8. Fix A, B ∈ Z such that x3 + Ax + B is separable over Q. Then
                                                                            1
                         #{D ∈ D(N) : ED (Z) \ ED [2] 6= ∅} ≫A,B N 2 .

Proof. As before, take C to be the binary cubic form such that C(x, 1) = x3 + Ax + B.
Take F (X, Y ) = Y · C(X, Y ), which has leading coefficient 1 and must have non-zero
discriminant, because C is separable over Q. Appealing to work of Xiao [31, Theorem 1.2],
we conclude that
                                                                         1
              # D ∈ D(N) : F (α, β) = D for some (α, β) ∈ Z2 ≫F N 2 .
                 

If F (α, β) = β · C(α, β) = D, then β | D and we may write D = βd, for a suitable
d ∈ N. Hence C(α, β) = d, and so C(αd, βd) = d4 , which thereby gives a point (αd, d2) ∈
ED (Z).                                                                                
                         QUADRATIC TWISTS OF AN ELLIPTIC CURVE                            17

                               6. Character sum input
   The techniques developed by Heath-Brown in [18, 19] allow us to prove the following
result to handle sums of products of quadratic characters. Our proof will also incorporate
some refinements made in [10]. We have chosen to extract a general form of the result
since we will need to apply it several times in different contexts.
Theorem 6.1. Let I be a non-empty finite set and fix some subsets J1 , . . . , Jr of I.
Define a function Φ : I × I → F2 such that Φ(i, i) = 0 for all i ∈ I. Fix κ, ε, C > 0. For
each i ∈ I:
     • let ci | βi be positive integers such that ci ⩽ C, βi ⩽ (log N)κ ;
                                                                          √
     • let Ki /Q be a Galois extension and let αi ∈ K × such that Ki ( αi ) is Galois over
                                                 √
        Q of degree less than C and Disc(Ki ( αi )/Q) | βi ;
     • let χi be a multiplicative function such that for any prime p,
                                  αi
                                  
                                           if p splits completely in Ki ,
                        χi (p) =     p
                                  0       otherwise,
       where p denotes a prime in Ki lying over p;
     • let fi be a multiplicative function such that for any q ∈ Z/ci Z, there exists fi,q ∈
       [0, 1] such that fi (p) = fi,q for every prime p ≡ q mod ci .
Define
                                              1        X
                              λ := max                       fi,q .
                                    i∈I #(Z/ci Z)×
                                                           ×
                                                  q∈(Z/ci Z)

Let M be the maximum possible size of a subset U ⊆ I such that Φ(i, j) + Φ(j, i) = 0 for
every i, j ∈ U. Let
                                 XY                          Y  Di Φ(i,j)
                       S(N) :=             fi (Di )χi (Di )                 ,
                                                                  D j
                                 (Di ) i∈I                  i,j∈I
                                                                                Q
    Q the sum
where                           Q of positive integers (Di )i∈I such that i Di ∈ D(N),
              Q is over all tuples
gcd( i Di , 2 i βi ) = 1, and i∈I\Jk Di 6= 1 for every k = 1, . . . , r. Then
              X X Y                             Y  Di Φ(i,j)
                                                                  + O N(log N)(M −1)λ−1+ε ,
                                                                                         
     S(N) =                  fi (Di )χi (Di )
                U        i∈U                   i,j∈U
                                                       Dj
                  (Di )i∈U

where the sum over U is taken over all U ⊆ I of size M satisfying all of the following:
 (P1) U 6⊆ Jk for every k = 1, . . . , r.
 (P2) Φ(i, j) + Φ(j, i) = 0 for every i, j ∈ U.
                                                                  √
 (P3) For any i ∈ U such that Φ(i, j) = 0 for all j ∈ U, we have αi ∈ Ki (ζci ), where
       ζci denotes a primitive ci -th root of unity.
 (P4) For any distinct i, j ∈ U such that Φ(i, k) = Φ(j, k) for all k ∈ U, we have
       √
         αi αj ∈ Ki (ζci ) · Kj (ζcj ).
The implied constant depends at most on #I, κ, ε, C, λ.
  The assumptions on fi in Theorem 6.1 imply that
                           X fi (p)
                                    ⩽ λ log log N + O(1)                               (6.1)
                           p⩽N
                                 p

for every i, by Mertens’ theorem.
18                        TIM BROWNING AND STEPHANIE CHAN

Definition 6.2 (Linked indices and admissible sets). Let I, Φ be as in the setting of
Theorem 6.1. We say that two indices i, j ∈ I are linked if Φ(i, j) + Φ(j, i) = 1, and
unlinked if Φ(i, j) + Φ(j, i) = 0. We say that U ⊆ I is an unlinked set of indices if any
i, j ∈ U are unlinked. We say that an unlinked set U is admissible if it satisfies both (P3)
and (P4).
6.1. Preliminaries. We recall several results that we will need to prove Theorem 6.1.
The first is a version of the Siegel–Walfisz theorem worked out by Goldstein [12].
Lemma 6.3. Let ε > 0. Let K/Q be a Galois extension of degree n. Let χ be a non-trivial
primitive finite Hecke character of K with conductor f such that
                          | Disc(K/Q) · NormK/Q (f)| ⩽ (log N)κ .
Then                                                          
                                                             1
                             X
                                        χ(p) ≪ N exp −(log N) ,
                                                             3

                         p⊂OK prime
                        NormK/Q (p)⩽N
                             p∤f

where the implied constant depends only on n and κ.
   The next result is on the double oscillation of characters. An important result of this
type by Heath-Brown [16, Theorem 1] is enough for most cases, however the (MN)ε term
that appears causes problem when N and M are of very different sizes. An alternative
form of this result [18, Lemma 4] removes this issue and is sufficient for our application.
The optimal power saving that follows from the argument of [18, Lemma 4] can be found
in [10, Lemma 15], which takes the following form.
Lemma 6.4. Let am and bm be complex numbers such that |am |, |bm | ⩽ 1. Then for every
M, N ⩾ 1 and for every ε > 0, we have
                X X                   n           1           1
                        am bn µ2 (2m)     ≪ε MN(M − 2 +ε + N − 2 +ε ).
               m⩽M n⩽N
                                       m

Lemma 6.5 ([27, Theorem 1]). Let f be a non-negative multiplicative function that sat-
isfies f (n) ⩽ C ω(n) , for some constant C ⩾ 1. Then we have
                                                                !
                              X                 Y       X f (p)
                                     f (n) ≪C       exp
                            X−Y <n⩽X
                                              log X     p⩽X
                                                             p
                               √
uniformly for 2 ⩽ X exp(− log X) ⩽ Y < X.
Lemma 6.6 ([15, Lemma A, p. 265]). Uniformly for positive integer ℓ and X ⩾ 2, we
have
                                         X     (log log X + C0 )ℓ−1
                 #{n ⩽ X : ω(n) = ℓ} ≪       ·                      ,
                                       log X          (ℓ − 1)!
where C0 is an absolute constant.
6.2. Dissection. Define
                             Ω := ⌈e · #I · (log log N + C0 )⌉,
where C0 is the constant in Lemma 6.6. We will dissect the sum according to the size of
each Di with the dissection parameter
                                   ∆ := 1 + (log N)−#I .
                         QUADRATIC TWISTS OF AN ELLIPTIC CURVE                                      19

For each i ∈ I, define a number Ai of the form 1, ∆, ∆2 , . . . . For each A = (Ai )i∈I , define
the restricted sum
                                XY                       Y  Di Φ(i,j)
                      S(N, A) =         fi (Di )χi (Di )                 ,
                                     i                   i,j
                                                              Dj
                                      (Di )

where the sum over (Di ) is subject to the conditions
                Y                                                       Y
     gcd(Di , 2   βi ) = 1, ω(Di ) ⩽ Ω, Ai ⩽ Di < ∆Ai ,                         Di ∈ D(N), and
                    i                                                       i
                                Y
                                      Di 6= 1 for every k = 1, . . . , r.                        (6.2)
                             i∈I\Jk
                                                                     Q
  If Ai = 1, the condition Ai ⩽ Di < ∆Ai implies that Di = 1. If i∈I\Jk Ai 6= 1 for every
                                                                             Q
k = 1, . . . , r, the condition (6.2) can be dropped from the sum S(N, A). If i∈I\Jk Ai = 1
holds for some k, the condition (6.2) forces S(N, A) = 0.
  The number of possible Ai up to N is bounded by
                           log N            log N
                                  =                      ≪ (log N)1+#I .
                           log ∆    log(1 + (log N)−#I )
Since there are #I-many variables, the number of A such that S(N, A) is non-trivial is
                                         ≪ (log N)#I(1+#I) ,
We also define here two parameters
                                                                             1
                                                                                   
                †               4(1+#I·(1+#I))                 ‡                ·ε
              N := (log N)                            and   N := exp (log N) #I      .

6.3. Number of prime factors of the variables. We bound the contribution from
those (Di ) such that ω(Di ) ⩾ Ω for some i ∈ I.
Lemma 6.7.                             X
                           S(N) =             S(N, A) + O(N(log N)−1 ),
                                        A
where the sum is over A is such that
                                               Y
                                                     Ai ⩽ N.
                                               i∈I

Proof. We bound each summand of S(N) thatQdoes not satisfy ω(Di ) < Ω trivially by 1.
If ω(Di ) ⩾ Ω for some i ∈ I, then setting n = i∈I Di , we must have ω(n) ⩾ Ω. Given n,
each prime factor of n divides one of the #I-many Di . Therefore the contribution from
such n is bounded by                     X
                                    ≪        (#I)ω(n) .
                                                n⩽N
                                               ω(n)⩾Ω
By Lemma 6.6, we can bound this sum by
                 N X (#I)ℓ (log log N + C0 )ℓ
            ≪
               log N              ℓ!
                          ℓ⩾Ω

                      N (#I)Ω (log log N + C0 )Ω X (#I)ℓ (log log N + C0 )ℓ
               ⩽                                                            .
                    log N          Ω!            ℓ⩾0
                                                              Ωℓ

The last sum is a geometric series. Substituting Ω := ⌈e · #I · (log log N + C0 )⌉ and using
Stirling’s approximation, we get the upper bound N(log N)−1 , as desired.                 
20                                 TIM BROWNING AND STEPHANIE CHAN

6.4. Incomplete boxes. We bound the contribution from
                             (                      )
                                   Y
                        F1 := A :     Ai ⩾ ∆−#I N .
                                                        i

Bounding the summands of S(N, A) trivially by 1, we have
          X                 X
                                   (#I)ω(n) ≪ 1 − ∆−#I N(log N)#I−1 ,
                                                         
              |S(N, A)| ⩽
             A∈F1                    ∆−#I N ⩽n⩽N

where the last expression follows from Lemma 6.5. Since ∆ = 1 + (log N)−#I , we have
                                   −#I
         ∆−#I = 1 + (log N)−#I          = 1 − #I(log N)−#I + O((log N)−2#I ),
so inserting this gives
                                         X
                                              |S(N, A)| ≪ N(log N)−1 .                                       (6.3)
                                       A∈F1


6.5. Few large indices. We want to bound the contribution from A with very few large
indices. We will bound the contribution from the set
                        F2 := A : #{i ∈ I : Ai ⩾ N ‡ } < M .
                              

Let m be the product of those Di ⩾ N ‡ and let W = {i ∈ I : Ai ⩾ N ‡ }, then
             X                   X                     X       Y
                 |S(N, A)| ⩽            (#I − r)ω(m)              fi (Di ).
                A∈F2                     m⩽(N ‡ )#I−r                    Q
                                                                             (Di )i∈W   i∈W
                #W=r                                                                  N
                                                                             i∈W Di ⩽ m


Applying Lemma 6.5, the inner sum becomes
                                                                                 !
               X        Y                     N                X X fi (p)                N
                                fi (Di ) ≪         exp                               ≪     (log N)rλ−1 ,
                                           m log N             p⩽N i∈W
                                                                             p           m
             (Di )i∈W     i∈W
         Q              N
             i∈W  D i ⩽ m


where we have applied (6.1). Then putting this back
       X                                                X          (#I − r)ω(m)
              |S(N, A)| ≪ N(log N)rλ−1                                          ≪ N(log N)rλ−1+ε .
      A∈F2                                                  ‡ #I−r
                                                                       m
                                                  m⩽(N )
      #W=r

Summing over r ⩽ M − 1, we have
                      X
                          |S(N, A)| ≪ N(log N)(M −1)λ−1+ε .                                                  (6.4)
                                  A∈F2


6.6. Two large linked indices. Let
                    F3 := {A : Ai , Aj ⩾ N † for some linked i, j} \ F1 .
                                               
                                       Di         Dj
If i and j are linked, exactly one of D j
                                          and     Di
                                                     can appear in the sum.
   For any A ∈ F3 , we have
                                                                                                    
                                      X            X              X                             Di
              |S(N, A)| ≪                                                    a(Di )b(Dj )                ,
                                                                                                Dj
                                  (Du )u∈I\{i,j} Ai ⩽Di <∆Ai Aj ⩽Dj <∆Aj
                           QUADRATIC TWISTS OF AN ELLIPTIC CURVE                                        21

where
                                                       Y  Di Φ(i,k)  Dk Φ(k,i)
                     a(Di ) = fi (Di )χi (Di )                            ,
                                              k6=i,j
                                                      D k       D i

                                                Y  Dj Φ(j,k)  Dk Φ(k,j)
                     b(Dj ) = fj (Dj )χj (Dj )                              .
                                               k6=i,j
                                                      Dk         Dj

It follows from the assumptions that |a(Di )|, |b(Dj )| ⩽ 1. Apply Lemma 6.4, then since
Ai , Aj ⩾ N † , we obtain
                                                         1
                                 |S(N, A)| ≪ N(N † )− 2 +ε .
Summing over O((log N)#I·(1+#I) ) possible A, we conclude that
                                          1
                 X
                     |S(N, A)| ≪ N(N † )− 2 +ε (log N)#I·(1+#I) ≪ N(log N)−1 .     (6.5)
              A∈F3

6.7. One large and one small linked indices. Define
           F4 = {A : 2 ⩽ Aj < N † , Ai ⩾ N ‡ for some linked i, j} \ (F1 ∪ F3 ).
Any j that is linked to i must satisfy Aj < N † since we assumed that A ∈    / F3 .
   Set
                                          Y  Di Φ(i,j)  Dj Φ(j,i)
                        χ(Di ) = χi (Di )                               .
                                          j6=i
                                                  Dj          Di
                                                            
                                                   Di         Dj
If i and j are linked, then exactly one of D        j
                                                         and  Di
                                                                  appears non-trivially in the
expression. If i and j are unlinked, then either Φ(i, j) = Φ(j, i) = 0, so neither symbol
appears, or Φ(i, j) = Φ(j, i) = 1, in which case we collect the two symbols as
                                                               Dj −1 !
                       Di      Dj              Di −1 Dj −1    (−1)   2
                                     = (−1) 2 · 2 =                        .              (6.6)
                       Dj      Di                                Di
Therefore χ lifts to a character in Ki with modulus
                          Y
                    4βi          Dj < 4βi (N † )#I−1 < 4(log N)κ (N † )#I ,
                          j linked to i

where κ is as in the assumptions of Theorem 6.1. Then
                                                    X           X
                             S(N, A) ≪                               fi (Di )χ(Di ) .
                                                 (Dj )j∈I\{i}   Di

Now apply the assumption on the number of prime factors of Di , so

                                                X           Ω
                                                            X    X
                         S(N, A) ≪                                         fi (Di )χ(Di ) .
                                          (Dj )j∈I\{i} ℓ=1        Di
                                                                ω(Di )=ℓ

Recall from the assumptions that fi (p) only depends on the value of p mod ci . Write
Di = p1 · · · pℓ and p1 < p2 < · · · < pℓ . Then ℓ ⩽ Ω and we have
                                                                                
                   X X X  Ω                          X                      Y
 S(N, A) ≪                                 max ×           µ2 2p1 . . . pℓ   Dj  χ(pℓ ) ,
                                              b∈(Z/4ci Z)
              (Dj )j∈I\{i} ℓ=1 p1 ,...,pℓ−1                 pℓ ≡b Qmod 4ci                    j∈I\{i}
                                                               pℓ ∤ j βj
22                         TIM BROWNING AND STEPHANIE CHAN

where
                                  1            1      ∆Ai
                            (N ‡ ) Ω < (Ai ) ℓ < pℓ <            .
                                                   p1 · · · pℓ−1
  We use a sum of Dirichlet characters ψ mod 4ci to detect the condition pℓ ≡ b mod 4ci .
Take χ′ to be the character in Ki such that χ′ (p) = χψ(NormKi /Q (p)) for any degree
1 prime p in Ki . At any prime p that splits completely in Ki /Q, the value of χ′ is
independent of the choice of p above p. The number of prime ideals p in Ki of degree
                                                            1
greater than 1 with norm up to X is bounded by O(X 2 ), since then p2 | NormKi /Q (p).
Recall that χ is 0 at any prime p that does not split completely in Ki . Hence we obtain
                   X                 1         X                       1
                       χ(p)ψ(p) =                         χ′ (p) + O(X 2 ).
                   p⩽X
                                  [Ki : Q] p⊂O prime
                                                        K
                                                   NormKi /Q (p)⩽X

Notice that χ′ must be non-trivial because Dj ⩾ 2 for some j linked to i, and by assump-
tion Dj is coprime to 4ci .
   Now apply Lemma 6.3, noting that the modulus of the character χ′ is less than
4(log N)κ (N † )#I = 4(log N)κ+4#I(1+#I·(1+#I)) . Then, for any B > 0, we obtain
                                       
                                                                                −B
          X
                   2
                                 Y                          Ai         1       ‡
                  µ 2p1 . . . pℓ     Dj χ(pℓ ) ≪B
                                                                        log N       + Ω,
      p ≡κ mod 4c
                                                      p 1 · · · pℓ−1   Ω
        ℓ       i              j∈I\{i}
                                                                             Q           Q
where the last term comes from those pℓ that divide some 2p1 · · · pℓ−1        j6=i Dj   j βj .
Summing over pℓ−1 , . . . , p1 , and then over (Dj )j∈I\{i} , we have
                                                                  −B
                                                       1         ‡
                             S(N, A) ≪B N(log N)          log N        .
                                                       Ω
Picking B large enough and summing over O((log N)#I·(1+#I) ) possible A, we finally
deduce that                X
                              |S(N, A)| ≪ N(log N)−1 .                        (6.7)
                              A∈F4

6.8. Inadmissible sets. Define
                                                   [
                                  F5 :=                     F5 (U),
                                          U unlinked
                                          inadmissible

where
                                               / U, Ai ⩾ N ‡ for all i ∈ U}.
               F5 (U) := {A : Ak = 1 for all k ∈
If U does not satisfy (P3), we can take i ∈ U such that Φ(i, j) = 0 for all j ∈ U and
√
  αi ∈/ Ki (ζci ) so that χi ψ is non-trivial for any Dirichlet character ψ mod ci . Then the
argument is similar to that for A ∈ F4 , but where b is instead taken from (Z/ci Z)× and
the sum is over pℓ ≡ b mod ci .
   If U does not satisfy (P4), take {i, j} ⊆ U such that Φ(i, k) = Φ(j, k) for all k ∈ U,
               √
assume that αi αj ∈    / Ki (ζci ) · Kj (ζcj ). Set
                                          Y  Di Φ(i,k)  Dk Φ(k,i)
                           ϕ(Di ) =                                   .
                                                    Dk     Di
                                  k∈U \{i,j}

Notice that Φ(i, j) = Φ(j, j) = 0 and also Φ(j, i) = Φ(i, i) = 0 by assumption.
                                                                                Since
                                                                           −1
the indices in U are unlinked, it follows from (6.6) that ϕ(Di ) is either Di or trivial
                            QUADRATIC TWISTS OF AN ELLIPTIC CURVE                                                23

depending on Dk and the values of Φ(i, k) for k ∈ U \ {i, j}. Since Φ(i, k) = Φ(j, k) for
all k ∈ U, we have
                     X             X                                       X
  S(N, A) ≪                                    fi (Di )χi (Di )ϕ(Di )                 fj (Dj )χj (Dj )ϕ(Dj ) .
                 (Dk )k∈U \{i,j} Ai ⩽Di <∆Ai                            Aj ⩽Dj <∆Aj
      √                                                   √           √
Since αi αj ∈ / Ki (ζci ) · Kj (ζcj ), we deduce that Ki ( αi ) · Kj ( αj ) 6⊆ Ki (ζci ) · Kj (ζcj ) and
    √            √                                                                  √
Ki ( −αi ) · Kj ( −αj ) 6⊆ Ki (ζci ) · Kj (ζcj ). Therefore at least one of Ki ( αi ) 6⊆ Ki (ζci )
         √                                                                  √
and Kj ( αj ) 6⊆ Kj (ζcj ) holds, and similarly at least one of Ki ( −αi ) 6⊆ Ki (ζci ) and
    √
Kj ( −αj ) 6⊆ Kj (ζcj ) holds. This allows us to take some k ∈ {i, j} such that the character
χk ϕψ is non-trivial for every Dirichlet character ψ mod ck . Then the argument proceeds
similarly as in the case for A ∈ F4 by applying Lemma 6.3 to χk ϕψ.
  Therefore we conclude that
                                    X
                                         |S(N, A)| ≪ N(log N)−1 .                                   (6.8)
                                    A∈F5

6.9. Proof of Theorem 6.1. By Lemma 6.7, (6.3),(6.4), (6.5), (6.7), and (6.8), it remains
to consider                      X
                                            S(N, A).
                                       / 1 ∪F2 ∪F3 ∪F4 ∪F5
                                      A∈F

Since A ∈/ F2 , there are at least M indices such that Ai ⩾ N ‡ . Call this set of indices
U. Any two indices in U must be unlinked because A ∈       / F3 . The assumption that any
unlinked set must have size ⩽ M implies that U must have size exactly M. Moreover any
other indices not in U must be linked to some indices in U, and so we are forced to have
Aj = 1 for any j ∈/ U because A ∈ / F3 ∪ F4 .
  Now if U ⊆ Jk for some  Q k ∈ {1, . . . , r}, then Aj = 1 for all j ∈ I \ Jk . This would
contradict the condition i∈I\Jk Di 6= 1. Therefore we can assume that U 6⊆ Jk . Also
A∈ / F5 allows us to assume that U is admissible. Substituting Di = 1 for all i ∈ / U gives
the main term in Theorem 6.1.

                      7. Quadratic twists with full two-torsion
   In this section, we will prove Theorem 2.2. The lower bound in Theorem 2.2 follows
from Lemma 5.8, and so it remains to prove the upper bound. For convenience, we
shall work with a different model for the elliptic curves. If a monic polynomial f ∈ Z[x]
has three distinct roots r1 < r2 < r3 over Q, then r1 , r2 , r3 ∈ Z and it follows that
f (x + r1 ) = x(x − (r2 − r1 ))(x − (r3 − r1 )). Therefore, on using a linear transformation,
it suffices to consider the integral points with respect to the model
                                   ED : y 2 = x(x − AD)(x − BD),                                           (7.1)
where 0 < A < B are integers that are fixed, and D ∈ D. Accordingly, we define
       ∗
         (Z) := ED (Z) \ ED [2] = (x, y) ∈ Z2 : y 6= 0, y 2 = x(x − AD)(x − BD) .
                                 
     ED
The following result is a refinement of Theorem 2.2.
Theorem 7.1. Let A, B ∈ Z such that 0 < A < B and consider the model (7.1). Then
                              (           1
                 ∗              N(log N)− 4 +ε if AB ∈
                                                     / Q2 and B(B − A) ∈  / Q2 ,
  #{D ∈ D(N) : ED (Z) 6= ∅} ≪             1
                                N(log N)− 8 +ε if AB ∈ Q2 or B(B − A) ∈ Q2 ,
where the implied constant depends at most on A, B and ε.
24                           TIM BROWNING AND STEPHANIE CHAN

     Define
                              D+ := {D > 0 : D ∈ Z square-free}
and
                                D+ (N) := {D ∈ D+ : D ⩽ N}.
We may assume that gcd(A, B) = 1, since otherwise we can consider the larger family
where A and B are replaced by A/ gcd(A, B) and B/ gcd(A, B). This assumption also
implies that A, B, B − A are pairwise coprime. The main result of this section is the
following proposition.
Proposition 7.2. Let A, B ∈ Z such that 0 < A < B and gcd(A, B) = 1, and consider
the model (7.1). Fix κ > 0. Then
                                                    (          1
                                                     N(log N)− 4 +ε if AB ∈
                                                                          / Q2
                                            −κ
                                                
               +       gcd(x, D) ⩾  N(log N)
    # D ∈ D (N) :                         ∗       ≪            1
                       for some (x, y) ∈ ED (Z)      N(log N)− 8 +ε if AB ∈ Q2 ,
where the implied constant depend at most on A, B, κ and ε.
                     ∗
  Suppose (x, y) ∈ ED  (Z), so that y 6= 0. Let g := gcd(x, D) and write x = g x̃ and
D = g D̃. Then from the equation for ED , we see that g 3 | y 2 . Since D is square-free,
g must also be square-free, so g 2 | y and we write y = g 2ỹ. We may now rewrite the
equation as
                              g ỹ 2 = x̃(x̃ − AD̃)(x̃ − B D̃).                    (7.2)
Here gcd(x̃, D̃) = 1, so
                                          gcd(x̃, x̃ − AD̃) | A
                                          gcd(x̃, x̃ − B D̃) | B
                                gcd(x̃ − AD̃, x̃ − B D̃) | B − A.
We proceed by rewriting the factors appearing on the right hand side of (7.2) as
                                                   x̃ = G1 y12 ,
                                           x̃ − AD̃ = G2 y22 ,                               (7.3)
                                           x̃ − B D̃ = G3 y32 ,
where G1 , G2 , G3 are square-free integers and y1 , y2 , y3 are non-zero integers, such that
G1 G2 G3 = g(δ1 δ2 δ3 )2 with
       δ1 := gcd(G2 , G3 ) | B − A,        δ2 := gcd(G3 , G1 ) | B,   δ3 := gcd(G1 , G2 ) | A.
Since A, B, B−A are pairwise coprime, δ1 , δ2 , δ3 are also pairwise coprime. If p | gcd(δi , D̃),
then p | x̃ by (7.3). But gcd(x̃, D̃) = 1, and so it must be that gcd(δ1 δ2 δ3 , D̃) = 1. This
observation, together with gcd(g, D̃) = 1, implies that gcd(G1 G2 G3 , D̃) = 1. Taking the
difference between the equations in (7.3), the system can be rewritten as
                                      G1 y12 − G2 y22 = AD̃
                                      G1 y12 − G3 y32 = B D̃                                     (7.4)
                                      G2 y22 − G3 y32 = (B − A)D̃.
                               ∗
   We have seen that (x, y) ∈ ED (Z) gives a system of the form (7.4). For given distinct
i and j, consider the map
               {(x, D) : D ∈ D, (x, y) ∈ ED (Z) for some y 6= 0} → Z6=0 × Z6=0 ,                 (7.5)
                           QUADRATIC TWISTS OF AN ELLIPTIC CURVE                               25

given by (x, D) 7→ (Gi yi2, Gj yj2). Given (Gi yi2 , Gj yj2 ), we can recover the value of D̃ from
the equations in (7.4), and then the value of Gk yk2 , where k 6∈ {i, j}. Since yk 6= 0 and Gk
is square-free, this is enough to recover Gk . Similarly, we can recover Gi and Gj . We also
get g from the square-free part of G1 G2 G3 . Finally we obtain a pair (x, D) through the
identities x = g x̃ = gG1y12 and D = g D̃.
   The Gi we have constructed are square-free but not necessarily all positive. We now
show the case with any negative Gi has negligible contribution. Over R, the curve ED
has two connected components, we bound the number of integral points that lie in the
compact component.
Lemma 7.3. Suppose B > A are coprime positive integers. Fix κ > 0.
                                                                 
    X
                      ∗                                    N
         # (x, y) ∈ ED (Z) : x < BD and gcd(x, D) ⩾             κ
                                                                    ≪ (log N)2κ ,
     +
                                                        (log N)
     D∈D (N )

where the implied constant depends at most on A, B.
                    ∗
Proof. If (x, y) ∈ ED (Z) is such that x < BD, then we have a solution (y1 , y2 , y3 ) to (7.4)
with G2 , G3 < 0 and G1 > 0. The condition gcd(x, D) ⩾ (logNN )κ implies that D̃ ⩽
(log N)κ . Looking at the second equation G1 y12 − G3 y32 = B D̃, the terms on the left are
both positive, so G1 y12, G3 y32 ≪ (log N)κ . This gives ≪ (log N)2κ possible (G1 y12, G3 y32 ).
Finally we use the fact that the map (7.5) has O(1) fibres above (G1 y12, G3 y32 ), giving O(1)
choices for y, x, D overall.                                                                 
  Lemma 7.3 allows us to restrict to the points with G1 , G2 , G3 > 0 in the rest of our
argument.

7.1. 2-Selmer elements from integral points with large gcd(x, D). We will use
Theorem 6.1 to prove the following lemma.
Lemma 7.4. Suppose B > A are coprime positive integers. Fix κ > 0. Then
                                            
                   x ⩾ BD and
                                                 (            1
    
            +                             −κ
                                                  N(log N)− 4 +ε if AB ∈
                                                                        / Q2
   # D ∈ D (N) : gcd(x, D) ⩾ N(log N)          ≪              1
    
                   for some (x, y) ∈ E ∗ (Z)
                                                  N(log N)− 8 +ε if AB ∈ Q2 ,
                                               D

where the implied constant depend at most on A, B, κ and ε.
  We collect from (7.4) the local solvability conditions at the primes p dividing g, but
not AB(B − A)D̃. Note that such primes are necessarily odd since AB(B − A) is even.
These conditions may be written
                                            
                           −AD̃G2       −B D̃G3
                       p  =
                      
                                          p
                                                   =1     if p | G1 ,
                                                   
                           AD̃G1       −(B−A) D̃G 3
                             p
                                   =        p
                                                      = 1 if p | G2 ,
                                             
                       BD̃G1 = (B−A)D̃G2 = 1 if p | G3 .
                      
                      
                             p             p

For each i, define γi = gcd(AB(B − A), Gi ) and ni such that
                                           Gi = ni γi .
Thus gcd(ni , AB(B − A)) = 1 and ni is square-free, since Gi is square-free. Define
        R13 = −AD̃ · γ2 ,           R12 = −B D̃ · γ3 ,         R21 = −(B − A)D̃ · γ3 ,
        R23 = AD̃ · γ1 ,            R32 = B D̃ · γ1 ,          R31 = (B − A)D̃ · γ2 ,
26                           TIM BROWNING AND STEPHANIE CHAN

and                                                          Y
                                Ri0 = 1,     Ri4 =                   Rik ,
                                                     k∈{1,2,3}\{i}

for i ∈ {1, 2, 3}.
   We may now rewrite the local conditions at the primes dividing n1 n2 n3 as
                                             
                             R13 n2       R12 n3
                          p   p  = 1 if p | n1 ,
                                      =
                         
                         
                         
                             R23 n1
                               p
                                      = R21pn3 = 1 if p | n2 ,                                (7.6)
                         
                                             
                          R32 n1 = R31 n2 = 1 if p | n3 .
                         
                               p            p

Then, given γ1 , γ2, γ3 , D̃, the latter conditions are satisfied by (n1 , n2 , n3 ) if and only if
the expression
      1         Y         
                             R13 n2
                                          
                                               R12 n3
                                                      
                      1+                1+
  4ω(n1 n2 n3 )                p                 p
                p|n1
     Y             
                      R23 n1
                                   
                                        R21 n3
                                                Y       
                                                             R32 n1
                                                                            
                                                                                 R31 n2
                                                                                         
   ×          1+                  1+                    1+              1+                    (7.7)
                        p                 p                    p                     p
      p|n2                                        p|n3

is equal to 1. We can expand the first product as
      Y        
                  R13 n2
                             
                                  R12 n3
                                                  X     
                                                            R13 n2
                                                                    
                                                                       R12 n3
                                                                               
            1+               1+             =                                    .
                    p                p         n =n n n n
                                                            n13 n14    n12 n14
      p|n1                                               1   10 12 13 14


Similarly we expand the other products with indexing
               n1 = n10 n12 n13 n14 ,   n2 = n20 n21 n23 n24 ,       n3 = n30 n31 n32 n34 .
We will sum (7.7) over positive square free integers n1 , n2 , n3 coprime to AB(B − A)D̃,
with the exceptions
            (
              n1 n2 = 1 if D̃ = 1, AB not square, R32 and R31 are squares,
                                                                                    (7.8)
               n1 = 1 if D̃ = 1, AB, R32 are squares.

Lemma 7.5. Let κ > 0. Fix positive integers γ1 , γ2 , γ3 | AB(B − A) and take a square-
free positive integer D̃ ⩽ (log N)κ that is coprime to γ1 γ2 γ3 . Let τ be the square-free part
of γ1 γ2 γ3 D̃. We have
                                                                  
                           n1 , n2 , n3 ⩾ 1, n1 n2 n3 τ = D
          
                   +
                                                                        N          1
       # D ∈ D (N) : (7.6) holds, but (7.8) is not satisfied          ≪ (log N)− 4 +ε ,
          
                           gcd(n1 n2 n3 , AB(B − A)) = 1
                                                                        D̃

where the implied constant depends at most on A, B, κ and ε.
Proof. Let R(N) denote the quantity that is to be estimated. Summing (7.7) over the
(n1 , n2 , n3 ) satisfying the assumptions, and then expanding the sum, we get
                                                                                   
                                                   n1 n2 n3 τ ∈ D(N)               
                                              3
           R(N) = # (n1 , n2 , n3 ) ∈ Z>0 : (7.6) holds, but (7.8) is not satisfied
                                                    gcd(n1 n2 n3 , AB(B − A)) = 1
                                                                                   
                      X Y 1 Y 1  Rij  Y Y  nkl 
                   =                                                         ,
                           i
                              4ω(ni0 ) j6=0 4ω(nij ) nij           0⩽l⩽4
                                                                         nij
                  (nij )                                 k6∈{i,j}
                        QUADRATIC TWISTS OF AN ELLIPTIC CURVE                               27

where the sum is over tuples of positive integers (nij ) such that ij nij ∈ D( Nτ ), such
                                                                  Q
                                  Q
that (7.8) does not hold, but gcd( nij , AB(B − A)τ ) = 1. We apply Theorem 6.1 with
                      I = {10, 12, 13, 14, 20, 21, 23, 24, 30, 31, 32, 34},
   
   
          {30, 31, 32, 34}          if D̃ = 1, AB not square, R32 and R31 are squares,
J = {20, 21, 23, 24, 30, 31, 32, 34} if D̃ = 1, AB, R32 are squares,
   
                  ∅                 otherwise.
Furthermore, we take λ = 41 and
                                        (
                                            1 if k 6∈ {i, j} and j 6= 0,
                          Φ(kl, ij) =
                                            0 otherwise.

Finally, we take fi (n) = 4−ω(n) and ci = 1 for all i ∈ I. By [18, Lemma 9], the maximal
unlinked sets in I are of size 4, and those that are within I are
                       {i0, ij, ik, i4}, {i0, j0, ij, ji}, {ik, i4, jk, j4},
where i, j, k ∈ {1, 2, 3} denotes different non-zero indices. Therefore the error term in
                                        1
Theorem 6.1 becomes O( N    D̃
                               (log N)− 4 +ε ), which is satisfactory. It remains to treat the
main term in Theorem 6.1. We claim that the only maximal unlinked sets that are
admissible coincide with J , so that the main term vanishes.
   The first case to check is U = {i0, ij, ik, i4}. Here Φ(u, v) = 0 for all u, v ∈ U, so
for (P3) to hold, Rij and Rik are both squares. Since R12 , R21 , R13 < 0, the only possible
case is when i = 3, and R31 = (B − A)D̃ · γ2 and R32 = B D̃ · γ1 are squares. Since D̃
is coprime to γ1 γ2 and square-free, it must be that D̃ | B and D̃ | B − A. However by
assumptions B and B − A are coprime, so D̃ = 1. This possibility therefore lies in J .
   In the second case U = {i0, j0, ij, ji}, and again Φ(u, v) = 0 for all u, v ∈ U. Thus (P3)
implies that Rij and Rji are both squares. Since R12 , R21 , R13 < 0, the only possible
case is when {i, j} = {2, 3}, and R23 = AD̃ · γ1 and R32 = B D̃ · γ1 are squares. Then
R23 R32 is a square, and so AB is a square. This means that A and B are squares, since
gcd(A, B) = 1. By construction D̃ is square-free and coprime to γ1 , but D̃γ1 is a square
and so we conclude that D̃ = 1, which thereby leads us to J .
   For the third case, U = {ik, i4, jk, j4}, and we can check that
                     Φ(ik, i4) = Φ(jk, j4) = 0
                     Φ(ik, jk) = Φ(ik, j4) = Φ(i4, jk) = Φ(i4, j4) = 1.
We check (P4) with {ik, i4} or {jk, j4}. Then Rik Ri4 and Rjk Rj4 are both squares, so Rij
and Rji are both squares. This again force us into J , similarly to the second case.    

7.2. Exceptional points of the first kind. We now treat the first of the cases that
were previously excluded, as listed in (7.8). The following result on simultaneous Pell
equations [5, Theorem 1.2] will prove crucial.
Lemma 7.6. Let a, b be positive integers and u, v be non-zero integers. Then the number
of positive integer solutions (x, y) to the equation ax2 − by 2 = u, such that
    cy 2 − dz 2 = v for some positive integers c, d, z satisfying ab < cd and cd ∈ D(N),
                   √
is bounded by O( N (log N)2 ), where the implied constant depends at most on a, b, u, v.
28                         TIM BROWNING AND STEPHANIE CHAN

Proof. Rescale the equations to
                                     (ax)2 − aby 2 = au,
                                     (dz)2 − cdy 2 = −dv.
First suppose that none of ab, cd and abcd are squares. Then by [5, Theorem 1.2], we
have the upper bound
                                                             √
                   max{ax, y, dz} ⩽ max{|au|, |dv|, 2}C abcd(log ab)(log cd) ,         (7.9)
for an absolute constant C > 0. √ Suppose we have a solution to the first equation and let
ε be the fundamental unit of Q( ab). Then there exists a positive integer k such that
                                             √
                                  εk ⩽ ax + aby < εk+1.
                               √
We refer to α = ε−k (ax + aby) as the base solution, noting that 1 ⩽ α < ε and
|α| = |au/α| ⩽ |au|. In particular, the number of base solutions only depends on a, b, u.
   The solutions to the first equation all take the form
                                           √
                                     ax + aby = αεl ,
for positive integers l. Thus, given a base solution, it follows from (7.9) that
                                                      √
                          εl ≪ max{|au|, |dv|, 2}C abcd(log ab)(log cd) .
Taking logs and noting that cd ⩽ N, we have
              √                                                 √
          l ≪ abcd(log ab)(log cd)(log max{|au|, |dv|, 2}) + 1 ≪ N(log N)2 ,
which gives the claimed upper bound.
   It remains to check the case when one of ab, cd and abcd is a square. Since cd is square-
free and cd > ab ⩾ 1, cd and            √ be squares. If ab is a square, then we can factor
                            √ abcd cannot
the first equation as (ax − aby)(ax + aby) = au over Q. There are finitely many ways
to factor au as two factors over Q, from which we can solve for x and y. Therefore in this
case the number of solutions (x, y) is bounded in terms of a and u.                       
  The first case in (7.8) comes from integral points of the form (BD, 0) + 2ED (Q). In this
case D̃ = n1 = n2 = 1, and R32 = Bγ1 , R31 = (B − A)γ2 are both squares, so G1 B and
G2 (B − A) are squares. Putting back to (7.3) we see that xBD and (x − AD)(B − A)D
are squares.
Lemma 7.7. We have
                         xBD ∈ Q2 , (x − AD)(B − A)D ∈ Q2 ,    √
  X                                                        
                  ∗
     # (x, y) ∈ ED (Z) :                                      ≪ N(log N)2 ,
   +
                         gcd(x, D) = D, x > BD
D∈D (N )

where the implied constant depends at most on A, B.
Proof. The conditions implies that x̃B and (x̃ − A)(B − A) are squares. In the notation of
(7.3), G1 is the square-free part of B and G2 is the square-free part of B − A. Substitute
                         BG1 y12 = U 2     and     (B − A)G2 y22 = V 2
into the first two equations of (7.4),
                          (
                            (B − A)U 2 − BV 2 = AB(B − A)
                            U 2 − BG3 y32 = B 2 .

       √ 7.6, the number of positive integers (U, V ) satisfying the equations is bounded
By Lemma
by ≪A,B N (log N)2 . We can recover the integral point (x, ±y) from each (U, V ).      
                          QUADRATIC TWISTS OF AN ELLIPTIC CURVE                                    29

7.3. Exceptional points of the second kind. We proceed to treat the second case in
(7.8), and so we assume that AB, R32 are squares, D̃ = 1 and n1 = 1. In particular,
D = g and G1 = γ1 . Since A, B are coprime, we can write A = a2 , B = b2 for some
integers a, b. Since R32 = b2 γ1 is a square, we see that G1 is a square and hence x̃ is a
square. Thus x = g x̃ = Du2 for some integer u. Finally the conditions G1 , G2 , G3 > 0 are
equivalent to x > BD. In this way we are led to tackle the following result.
Lemma 7.8. Let B > A be coprime positive integers that are both squares. We have
                                                                      1
          X
                            ∗
                              (Z) : xD ∈ Q2 , x > BD ≪ N(log N)− 8 +ε ,
                 
               # (x, y) ∈ ED
            D∈D + (N )

where the implied constant depends at most on A, B.
                         ∗
Proof. Suppose (x, y) ∈ ED (Z) and x = Du2 , where u is a positive integer. Substituting
x = Du2 into the equation y 2 = x(x − a2 D)(x − b2 D), we obtain
                                    (u2 − a2 )(u2 − b2 ) = Dt2 ,
for some non-zero integer t, since y 6= 0. Then from the factorisation we can write
                                           u − a = g1 y12 ,
                                           u + a = g2 y22 ,
                                                                                               (7.10)
                                           u − b = g3 y32 ,
                                           u + b = g4 y42 .
where g1 , g2 , g3, g4 are positive square-free integers such that g1 g2 g3 g4 = Dv 2 for some
integer v. If pk | v then we must have pk | gcd(gi , gj ) for some i 6= j. In this way, since
a, b are assumed to be coprime, it follows that v | 2ab(b2 − a2 ). Write
                                                   gi
                                   ni =                         ,
                                        gcd(gi , 2ab(b2 − a2 ))
for 1 ⩽ i ⩽ 4. We easily conclude that
                                                   
                        2ag2       (b−a)g3       (a+b)g4
                              =             =             =1         if p | n1 ,
                      p   p                p
                  
                  
                                                         
                   −2ag1 = −(a+b)g3 = (b−a)g4 = 1
                  
                                                                      if p | n2 ,
                  
                       p         p           p                                           (7.11)
                        −(b−a)g1       (a+b)g2
                  
                  
                           p
                                  =       p
                                                 = 2bgp 4 = 1         if p | n3 ,
                                                     
                   −(a+b)g1 = −(b−a)g2 = −2bg3 = 1
                  
                                                                      if p | n4 .
                  
                          p              p             p

Note that n1 · · · n4 | g1 · · · g4 = Dv 2 , whence n1 · · · n4 ⩽ N, since n1 , . . . , n4 are coprime
to v.
  In order to prove the lemma we will first focus on bounding the quantity
                                                                                            
                                                 n1 n2 n3 n4 ∈ D(N), (7.11) holds           
       R(N) = # (n1 , n2 , n3 , n4 ) ∈ Z3>0 : gcd(n1 n2 n3 n4 , ab(b2 − a2 )) = 1              .
                                                 ni nj 6= 1 for all {i, j} ⊂ {1, 2, 3, 4} 
We shall deal with the case in which ni nj = 1 for some {i, j} ⊂ {1, 2, 3, 4} at the end of
the proof. Clearly, there exist Ri | a2 b2 (b2 − a2 )2 , for 1 ⩽ i ⩽ 4, such that (7.11) can be
rewritten as                               
                                     Ri ni
                                               = 1 if p | nj ,
                                       p
30                               TIM BROWNING AND STEPHANIE CHAN

whenever i 6= j. Since there are only finitely many possible R1 , R2 , R3 , R4 given a and b,
we will view R1 , R2 , R3 , R4 as fixed. The condition on all p | n1 can be packaged as
                                                                  
            1 Y                R2 n2                R3 n3             R4 n4
   Π1 = ω(n1 )         1+                   1+                 1+
          8                     p                     p                 p
                p|n1
                                                                                
            1            X               R2 n2       R3 n3     R4 n4      R2 R3 n2 n3
       = ω(n1 )
          8          Q                   n1,{2}      n1,{3}    n1,{4}       n1,{2,3}
                n1 = S∈P({2,3,4}) n1,S
                                                                                          
                                             R2 R4 n2 n4     R3 R4 n3 n4     R2 R3 R4 n2 n3 n4
                                        ×                                                        ,
                                                n1,{2,4}       n1,{3,4}            n1,{2,3,4}
where P denotes the power set. We define Π2 , Π3 , Π4 similarly, and expand the products
with indexing
           Y                   Y                       Y                    Y
  n1 =         n1,S , n2 =          n2,S , n3 =              n3,S , n4 =          n4,S .
         S∈P({2,3,4})               S∈P({1,3,4})                    S∈P({1,2,4})                S∈P({1,2,3})

Define                                                      (
                                                                1 if j ∈ S,
                                  Φ((i, S), (j, S ′ )) =
                                                                0 otherwise,
and take the set of indices to be
                    I = {(i, S) : i ∈ {1, 2, 3, 4}, S ∈ P ({1, 2, 3, 4} \ {i})} .
Then we may write
                                                                               Y          Φ(u,v)
                        X                       XY              1         Ru            nu
              R(N) =            Π1 Π2 Π3 Π4 =                                                          ,
                                                        u∈I
                                                            8ω(nu )       nu    u,v∈I
                                                                                        nv
                        (nu )                   (nu )

where Ru Q                            4 , and the sum is over tuples of positive integers (nu )
           depends on R1 , R2 , R3 , RQ
such that u nu ∈ D(N) and gcd( nu , ab(b2 − a2 )) = 1, and such that nu nv 6= 1 for all
distinct u, v. We apply Theorem 6.1 with λ = 81 and
                   Ji,j = {(i, S) ∈ I} ∪ {(j, S) ∈ I} for {i, j} ⊂ {1, 2, 3, 4}.
Furthermore, we take fu (n) = 8−ω(n) and cu = 1, for all u ∈ I. We can check that the
maximal unlinked sets have size 8 and each of them is contained in one of the Ji,j . Thus
the sum over U vanishes. Indeed, suppose that (i1 , S1 ) is unlinked to (i2 , S2 ) and (i3 , S3 ),
where i1 , i2 , i3 are distinct. Then, whether or not S1 contains i2 is determined by whether
or not i1 is contained in S2 . Similarly, whether or not S1 contains i3 is determined by
whether or not i1 is in S3 . This only leaves 2 possible choices for S1 , given S2 and S3 .
Hence the size of any unlinked indices, not of the form Ji,j , is bounded by 6. Therefore, on
                                                                                           1
putting M = 8, it follows fromTheorem 6.1 that the sum is bounded by O(N(log N)− 8 +ε ).
   It remains to deal with the remaining cases not considered in R(N), in which two of
n1 , n2 , n3 , n4 are equal to 1. We assume that ni = nj = 1, with {i, j, k, l} = {1, 2, 3, 4}.
Take the difference between the equations in (7.10) that are associated to ni and nj , and
then the difference between those associated to nk and nk , in order to get
                                          gi yi2 − gj yj2 = ci − cj ,
                                          gk yk2 − gl yl2 = ck − cl ,
where c1 = −a, c2 = a, c3 = −b, c4 = b. Notice that gi , gj | ab(b2 −a2 ) √
                                                                          because ni = nj = 1.
Therefore we can apply Lemma 7.6 to get the overall bound O( N(log N)2 ) in this
case.                                                                                       
                       QUADRATIC TWISTS OF AN ELLIPTIC CURVE                              31

7.4. Conclusion.
Proof of Lemma 7.4. We apply Lemma 7.5. The exceptions in (7.8) are dealt with in
Lemma 7.7 and Lemma 7.8.                                                       
Proof of Proposition 7.2. Combine Lemma 7.3 and Lemma 7.4.                                
                                                                                  ∗
Proof of Theorem 7.1. Apply Proposition 7.2 with κ = 13. For the points (x, y) ∈ ED (Z)
                                                                               2
with small gcd(x, D), we observe that (X, Y ) = (9x − 3(A + B)D, 27y) ∈ Z gives a
non-trivial integral point on the short Weierstrass model
         Y 2 = X 3 − 27(A2 + B 2 − AB)D 2 X − 27(2B − A)(B − 2A)(A + B)D 3 .
Moreover, the relation 9x = X + 3(A + B)D implies that gcd(X, D) | 9 gcd(x, D). We
may therefore apply Lemma 5.6 with K = 9N(log N)−κ to bound the number of integral
points with gcd(x, D) ⩽ N(log N)−κ . We conclude that
                             gcd(x, D) ⩽ N(log N)−κ
                                                     
                                                                    1
                      +
            # D ∈ D (N) :                       ∗       ≪ N(log N)− 2 κ+6 ,
                             for some (x, y) ∈ ED (Z)
which proves the desired upper bound for D ∈ D + (N).
  To treat negative D ∈ D(N), we instead consider the family
                          ED : y 2 = x(x − (B − A)D)(x − BD),
with D ∈ D + (N) Thus the role of A is replaced by B − A, and the argument runs as
before, leading to the same conclusion.                                         
                 8. Quadratic twists with partial two-torsion
  To prove Theorem 2.3, we consider instead the model
                             ED : y 2 = x(x2 + ADx + BD 2 ),                           (8.1)
for integers A, B such that A2 − 4B ∈    / Q2 . For such curves, the only two-torsion points
are the point at infinity and (0, 0), so
      ∗
     ED (Z) = ED (Z) \ {(0, 0)} = {(x, y) ∈ Z2 : y 2 = x(x2 + ADx + BD 2 ), y 6= 0}.
The lower bound in Theorem 2.3 follows from Lemma 5.8, whereas the upper bound will
follow from the next result.
                                                                      / Q2 . If B < 0
Theorem 8.1. Let ED be given by (8.1), for A, B ∈ Z such that A2 − 4B ∈
        2
or B ∈ Q , then
                                                               1
                                 ∗
                  # {D ∈ D(N) : ED (Z) 6= ∅} ≪ N(log N)− 8 log log N.
               / Q2 , then
If B > 0 and B ∈
                                                    49 
                 xB ∈  / Q2 or gcd(x, D) < N(log N)− 4 
                                                                      1
                                                          ≪ N(log N)− 8 log log N.
                                           99
   # D ∈ D(N) : or x < exp(N(log N)− 8 )
                                       ∗
                  for some (x, y) ∈ ED   (Z)
                                                       

The implied constants depend at most on A and B.
   Conjecture 1.1 pertains to elliptic curves in short Weierstrass form. After a suitable
change of variables, the equation (8.1) defining ED can be transformed into an equation
of the form y 2 = x3 + A′ x + B ′ , with A′ , B ′ ∈ Z such that A′ ≪ D 2 and B ′ ≪ D 3 . But
then it follows from Conjecture 1.1 that there exists constants C > 0 and ε > 0 such that
                ∗
any (x, y) ∈ ED   (Z) satisfies x < exp(CN 1−ε ), if D ∈ D(N). That Theorem 2.3 follows
from Theorem 8.1 is now obvious.
   Since Lemma 5.6 will be enough to deal with points with small gcd(x, D), we will focus
our attention on the case when gcd(x, D) is large.
32                          TIM BROWNING AND STEPHANIE CHAN

Proposition 8.2. Let ED be given by (8.1), for A, B ∈ Z such that A2 − 4B ∈/ Q2 . Let
κ > 0. Then
                                                        
            +     gcd(x, D) ⩾ N(log N)−κ and xB ∈  / Q2                 1
  # D ∈ D (N) :                      ∗                     ≪ N(log N)− 8 log log N,
                  for some (x, y) ∈ ED (Z)
where implied constant depends at most on A, B and κ.
                                              √
    Moving to the two-division field K := Q( A2 − 4B) of ED , note that we can rewrite
the equation as
                                 y 2 = x(x − αD)(x − αD),
where                         √                                √
                       −A + A2 − 4B                     −A − A2 − 4B
                  α :=                      and α :=                        .
                               2                                2
Over R, the curve ED has two connected components if A2 −4B > 0 and one if A2 −4B < 0.
If A2 − 4B < 0, the value of x2 + ADx + BD 2 is always positive and it follows that also
x > 0. If A2 − 4B > 0, on the other hand, then we must have x > − max{|α|, |ᾱ|}D for
any real point on ED .
                       ∗
    Suppose (x, y) ∈ ED  (Z) and let g := gcd(x, D). We shall follow the opening steps in
the proof of Proposition 7.2. Write x = g x̃ and D = g D̃, so that y = g 2 ỹ for some integer
ỹ, as before. Then substituting this back into the equation, we obtain
                    g ỹ 2 = x̃(x̃2 + AD̃x̃ + B D̃ 2 ) = x̃(x̃ − αD̃)(x̃ − αD̃).
Observe that since gcd(x̃, D̃) = 1, we have
                             δ := gcd(x̃, x̃2 + AD̃x̃ + B D̃ 2 ) | B.
Thus we can factor x̃ and x̃2 + AD̃x̃ + B D̃ 2 over Q as
                                                                  x̃ = g1 δy12           (8.2)
                     (x̃ − αD̃)(x̃ − αD̃) = x̃2 + AD̃x̃ + B D̃ 2 = g2 δy22,              (8.3)
where g1 , g2 , y1, y2 are integers such that g1 g2 = g and y1 y2 = ỹ. Substituting (8.2)
into (8.3), we obtain
                              (g1 δy12 )2 + AD̃g1 δy12 + B D̃ 2 = g2 δy22.           (8.4)
   In the next result, which is an analogue of Lemma 7.3, we bound the number of integral
points that lie in the compact component when there are two connected components.
                                                     / Q2 and A2 − 4B > 0. Then
Lemma 8.3. Fix κ > 0. Let A, B ∈ Z such that A2 − 4B ∈
                                                          
        X
                           ∗      x < max{|α|, |α|}D and
              # (x, y) ∈ ED (Z) :                       −κ   ≪ (log N)2κ ,
         +
                                  gcd(x, D)  ⩾ N(log N)
         D∈D (N )

where implied constant depends at most on A, B and κ.
                                 ∗
Proof. For such points (x, y) ∈ ED (Z) with D = gcd(x, D)D̃, we have
                              |x̃| < max{|α|, |α|}D̃ ≪ (log N)κ .
There are ≪ (log N)2κ choices of x̃ and D̃, which can be used to recover square-free g1
and g2 by (8.2) and (8.3), up to δ, since y1 , y2 6= 0 for non-torsion points.       
   When A2 − 4B < 0, the value of x2 + ADx + BD 2 is always positive. Thus g2 and
hence also g1 must be positive. If A2 − 4B > 0, on the other hand, it is possible that both
g1 , g2 are negative. This happens precisely when x = g x̃ = g2 g12 δy12 is negative, but such
points are handled by Lemma 8.3. Thus, in what follows, we can restrict our attention to
the case in which g1 and g2 are both positive.
                              QUADRATIC TWISTS OF AN ELLIPTIC CURVE                                        33

  We collect from (8.4) the local solubility conditions at the primes dividing g1 and g2 ,
but not B(A2 − 4B). These may be written
                             
                       Bδg2 = 1 if p | g1 and p ∤ B,
                          2p 
                       A −4B = 1 if p | g2 and p ∤ A2 − 4B.
                             p


                                                                D = g1 g2 D̃ is square-free.
In the above we have used that p | g1 g2 implies p ∤ D̃, because
                                                           2
  For each p | g2 and p ∤ B(A2 − 4B), the condition A −4B    p
                                                                 = 1 implies that p splits in
K/Q. From (8.3), we see that there is a prime p in OK above p such that x̃ ≡ αD̃ mod p,
so substituting this into (8.2) yields g1 δy12 ≡ αD̃ mod p, whence
                                                  !
                                          g1 δαD̃
                                                    = 1.
                                              p
Since p splits in K/Q, we have
                                                            !                    !
                                                  g1 δ D̃              g1 δ D̃
                                                                =
                                                    p                    p
and                                                                                  !             !
                                                          
                          B               B               αα            g1 δαD̃          g1 δαD̃
                                  =               =                =                                   .
                          p               p                p                p                p
                 
                 B
Therefore, if    p
                  = −1, then x̃ ≡ αD̃ mod p is automatically satisfied by one of the two
                                                        
primes above p. If instead Bp = 1, then it is clear that αp does not depend on the
                                         √
   √ of prime above p. Define L := K( α). For any prime p that splits completely in
choice
K( B)/Q, we define
                                             
                                     L/Q        α
                                           :=      ,
                                       p        p
                                                                    √
viewed as an Artin symbol in Gal(L/Q), taking values in Gal(L/K( B)) ∼    = F2 .
  Next, we write
                           g1 = n1 · γ1 and g2 = n2 · γ2 ,
where γ1 = gcd(g1 , 2B(A2 − 4B)) and γ2 = gcd(g2 , 2B(A2 − 4B)). Let
                                                              
                                 +          d
                     Sd := n ∈ D : 2 ∤ n,       = 1 for all p | n .
                                            p
Also define                                                   
                                                            d
                                       ωd (n) := # p | n :     =1 .
                                                            p
Fix a choice of δ | B, γ1 γ2 | 2B(A2 − 4B), and D̃. Define
                                      R21 = D̃δγ1              and      R12 = Bδγ2 .
We would like to count the number of pairs (n1 , n2 ) such that n1 n2 γ1 γ2 D̃ ∈ D + (N), with
gcd(n1 n2 , 2B(A2 − 4B)) = 1 and n2 ∈ SA2 −4B , and such that
                                 
                            R12 n2
                     
                              p
                                      =1      if p | n1 ,
                                                                                    (8.5)
                      L/Q       R21 n1
                                          = 1 if p | n2   and  B
                                                                  = 1.
                          p        p                           p
34                                TIM BROWNING AND STEPHANIE CHAN

For n1 ∈ D+ and n2 ∈ SA2 −4B , we note that the expression
              Y1         
                            R12 n2
                                    Y
                                            1
                                                  
                                                      L/Q
                                                           
                                                              R21 n1
                                                                     
                     1+                         1+                                                              (8.6)
                  2            p            2           p       p
                 p|n1                               p|n2
                                                ( Bp )=1
is equal to 1 if (8.5) is satisfied by n1 , n2 , and 0 otherwise.
Lemma 8.4. Let κ > 0. Fix positive integers δ | B, γ1 γ2 | 2B(A2 − 4B). Take a
square-free positive integer D̃ ⩽ (log N)κ that is coprime to γ1 γ2 . We have
                                                                      
                         n1 , n2 ⩾ 1, n1 n2 γ1 γ2 D̃ = D, (8.5) holds   N         1
     # D ∈ D+ (N) : gcd(n1 n2 , 2B(A2 − 4B)) = 1                         ≪ (log N)− 8 ,
       
                          n 6= 1 if R ∈ Q2
                                                                         D̃
                              2            12

where implied constant depends at most on A, B and κ.
Proof. Let R(N) denote the quantity that is to be estimated. Summing (8.6) over (n1 , n2 )
such that n2 6= 1 if R12 ∈ Q2 , and then expanding the sum, we easily arrive at the
expression
                                                                                            
                    X                         1                R12 n20 n21    L/Q    R21 n10 n12
     R(N) =                        ω(n10 n12 )+ωB (n20 n21 )
                                                                                                   ,
              n10 ,n12 ,n20 ,n21 2                                n12         n21       n21
               n20 n21 ∈SA2 −4B
                    n21 ∈SB

where the sum is over all positive integers n10 , n12 , n20 , n21 such that
                                     n10 n12 n20 n21 γ1 γ2 D̃ ∈ D + (N),
with gcd(n10 n12 n20 n21 , 2B(A2 − 4B)) = 1, n20 ∈ SA2 −4B , n21 ∈ SB ∩ SA2 −4B , and addi-
tionally n20 n21 6= 1 if R12 ∈ Q2 .
   We plan to apply Theorem 6.1 to estimate R(N). In order to facilitate this we define
                                             R10 = R20 = 1.
Then, we shall apply Theorem 6.1 with the following parameters. Firstly, we shall take
                                         (
                                           {10, 12} if R12 is a square,
               I = {10, 12, 20, 21}, J =
                                               ∅      otherwise,
and                                             (
                                                    1 if k 6= i and j 6= 0,
                                  Φ(kl, ij) =
                                                    0 otherwise.
The relevant arithmetic functions are
                        (
                         2−ω(n) if gcd(n, 2B(A2 − 4B)) = 1,
    f10 (n) = f12 (n) =
                         0        otherwise,
                        (
                         2−ωB (n) if n ∈ SA2 −4B and gcd(n, 2B(A2 − 4B)) = 1,
              f20 (n) =
                         0        otherwise,
                        (
                         2−ωB (n) if n ∈ SB ∩ SA2 −4B and gcd(n, 2B(A2 − 4B)) = 1,
              f21 (n) =
                         0        otherwise.
The relevant charaters are
                                                                                                   
                                                         R12                           L/Q        R21
           χ10 (·) = χ20 (·) = 1,       χ12 (·) =                  ,   χ21 (·) =                            ,
                                                          ·                             ·          ·
                              QUADRATIC TWISTS OF AN ELLIPTIC CURVE                                                  35

so that K10 = K20 = K12 = Q, K21 = K, α10 = α20 = 1, α12 = R12 and α21 = αR21 , But
then we may take λ = 21 and
                                  c10 = c12 = 1,   c20 = c21 = 2B(A2 − 4B).
We easily check that the maximal unlinked sets are
                                     {10, 12}, {10, 20}, {12, 21}, {20, 21}.
                                                                                                             1
Taking M = 2, we see that the error term in Theorem 6.1 becomes O( N     D̃
                                                                            (log N)− 2 +ε ).
   The sum in the main term in Theorem 6.1 is taken over all U satisfying (P1)–(P4).
Thus we need to check which maximal unlinked sets are admissible (so that they satisfy
(P3) and (P4)) and yet are not contained in J . Since c12 = 1, it follows from (P3) that
the set {10, 12} is only admissible if R12 is a square. Therefore, the sum in the main
term is only over U ∈ {{10, 20}, {12, 21}, {20, 21}}. (Indeed, if R12 is not a square then
{10, 12} is not admissible and it shouldn’t appear in the main term; alternatively, if R12
is a square then {10, 12} is admissible but contained in J .) Taking ε = 85 , we may deduce
that                                                             
                                                  N          − 18
                            R(N) = M(N) + O          (log N)        ,
                                                  D̃
where
           X X Y
 M(N) ≪                  fi (Di )
               U   (Di )i∈U i∈U
                   X                 1               X                    1               X                   1
        ≪                     ω(n10 )+ω (n20 )
                                               +                    ω(n12 )+ω (n21 )
                                                                                     +                                   .
               n10 ,n20   2              B
                                                    n12 ,n21    2             B
                                                                                          n20 ,n21      2ωB (n20 n21 )
            n10 n20 ⩽N/D̃                        n12 n21 ⩽N/D̃                        n20 n21 ⩽N/D̃
            n20 ∈SA2 −4B                       n21 ∈SA2 −4B ∩SB                      n20 n21 ∈SA2 −4B
                                                                                          n21 ∈SB

On appealing to Lemma 6.5, we easily deduce that
                    N         − 18       − 14      − 38
                                                           N         1
          M(N) ≪        (log N) + (log N) + (log N)        ≪ (log N)− 8 ,
                    D̃                                      D̃
which completes the proof of the lemma.                                                                              
  Let us comment briefly on the condition n2 6= 1 if R12 ∈ Q2 , appearing in the counting
function R(N) in the proof of Lemma 8.4. Dropping this condition would amount to
taking J to be the empty set in the proof. But thenPwe would obtain a contribution from
the admissible set {10, 12}, which takes the shape n10 n12 ⩽N/D̃ 2−ω(n10 n12 ) . This sum has
         √
order N
      D̃
           log N, which is much larger than the upper bound in Lemma 8.4.
                                                                                   ∗
Proof of Proposition 8.2. Lemma 8.3 allows us to restrict to points (x, y) ∈ ED      (Z) that
                                                                                κ
satisfy x > 0. Next, we sum the bound from Lemma 8.4 over D̃ ⩽ (log N) , and over all
                                                      ∗
choices of δ, γ1 , γ2 . The integral points (x, y) ∈ ED (Z) that have not been handled satisfy
                        2                       2
n2 = 1 and R12 ∈ Q , hence Bx = Bgg1δy1 = Bg2 δ(g1 y1 )2 = R12 (g1 y1 )2 is a square. This
proves Proposition 8.2.                                                                     

8.1. Exceptional points. To complete the proof of Theorem 8.1, it remains to deal with
the set of exceptional points.
Lemma 8.5. Let κ, τ > 0. If B < 0 or B ∈ Q2 , then
   X
                      ∗
                        (Z) : gcd(x, D) ⩾ N(log N)−κ and xB ∈ Q2 ≪ (log N)2κ .
           
        # (x, y) ∈ ED
   D∈D+ (N )
36                          TIM BROWNING AND STEPHANIE CHAN

If B > 0 and B 6∈ Q2 , then
                                                        
                                                      −κ
                                gcd(x, D) ⩾ N(log N)                              1
    X
                         ∗
             # (x, y) ∈ ED (Z) : xB ∈ Q2                   ≪ N(log N)−τ (log log N) 2 .
                                 x < exp(N(log N)−κ−τ )
                                                        
  D∈D + (N )

The implied constants depend at most on A, B and κ.
                                                                ∗
Proof. Lemma 8.3 allows us to restrict to points (x, y) ∈ ED      (Z) that satisfy x > 0, so
suppose that g1 , g2 are positive integers in the notation of (8.3). Since Bx = Bgg1δy12 =
Bg2 δ(g1 y1 )2 is a square, we deduce that g2 is the squarefree part of B/δ and B > 0.
  Recall that gcd(x̃, D̃) = 1.√Hence the greatest common divisor of the ideals (x̃ − αD̃)
and (x̃ − αD̃) must divide 2 A2 − 4B. But then, in the light of (8.3), we may write
                                        x̃ − αD̃ = ab2 ,
                      √
for some ideals a | 2B A2 − 4B and b of OK . Fix a representative for each ideal class of
OK . Take c to be the representative for the ideal class of b. Then b/c must be a principal
fractional ideal. Therefore we may take µ ∈ OK and ξ ∈ K such that µOK = ac2 and
ξOK = bc−1 . Note that, given A and B, there are only finitely many possible µ. Then
                                        x̃ − αD̃ = µξ 2 .                                  (8.7)
Taking conjugates in K/Q, we obtain
                                                       2
                                        x̃ − αD̃ = µξ .                                    (8.8)
                                                                                       √
Putting
  √     this back into (8.3), we see that µµ(ξξ)2 = g2 δy22 ∈ B · Q2 . Therefore Q( µµ) =
Q( B). Taking the difference of (8.7) and (8.8), we have
                            2                        √
                         µξ − µξ 2 = αD̃ − αD̃ = D̃ A2 − 4B.
Squaring gives
                             2
                         (µξ + µξ 2)2 − 4µµ(ξξ)2 = D̃ 2 (A2 − 4B).
           2            √                    2            √
Let η = |µξ + µξ 2 | + 2 µµ|ξξ| and η ′ = |µξ + µξ 2 | − 2 µµ|ξξ|, which are both in OQ(√B)
        2                              2
since µξ , µξ 2 ∈ OK implies that µξ + µξ 2 ∈ Z and µµ(ξξ)2 ∈ Z. Given D̃ and some
δ | B, each (η, η ′ ) can only correspond to at most two pairs of (x, D). Indeed, observe that
(η −η ′ )2 = 16µµ(ξξ)2 = 16g2 δy22, so (8.3) allows us to recover x̃ as one of the two solutions
to the quadratic equation, and hence g1 from (8.2). Therefore it suffices to bound the
number of η that satisfy the equation
                                     ηη ′ = D̃ 2 (A2 − 4B)
        √
over Q( B).
  First suppose B > 0 is a square and note that τ (d2 ) ⩽ 3ω(d) , for any d ∈ D + . We
deduce that η ∈ Z divides (A − 4B 2 )D̃ 2 , so there are O(3ω(D̃) ) choices for η. Summing
over all D̃ ⩽ (log N)κ , the contribution is bounded by ≪ (log N)2κ , by Lemma 6.5.
  Suppose
   √         next that B > 0 is not a square. In this case η ′ is the conjugate of η in
Q( B). There are O(3ω(D̃) ) choices of ideal d = ηOQ(√B) with norm D̃ 2 |A2 − 4B|. Fixing
the smallest generator β of d such that β > 1, we see that η must√be of the form βεk ,
where k ⩾ 0 is an integer and ε denotes the fundamental unit of Q( B). By assumption
1 < η ≪ x + D̃ ≪ exp(N(log N)−κ−τ ). Thus     there
                                                    are O(N(log N)−κ−τ ) possible η given
each d. We claim that any p | D̃ satisfies Bp = 1 or p | B. Indeed, if p | D̃ and p ∤ B,
then it follows from (8.3) that g2 δ is a square modulo p, which in turn implies that B is
                           QUADRATIC TWISTS OF AN ELLIPTIC CURVE                                        37

a square modulo p, since the first paragraph of the proof ensures that Bg2 δ is a square.
Putting everything together, the total contribution is found to be
                                                                          1
                                   X
             ≪ N(log N)−κ−τ               3ω(D̃) ≪ N(log N)−τ (log log N) 2 ,
                                       D̃⩽(log N )κ
                                     p|D̃⇒( Bp)
                                                6=−1

by Lemma 6.5.                                                                                           
8.2. Conclusion.
Proof of Theorem 8.1. We apply Proposition 8.2 and Lemma 8.5 with κ = 49  4
                                                                            and τ = 81 .
We are then left with the points with gcd(x, D) < N(log N)−κ , which we will handle
                                                           ∗
with Lemma 5.6. Transforming the integral points (x, y) ∈ ED (Z) to the integral points
                             2
(X, Y ) = (9x + 3AD, 27y) ∈ Z on the short Weierstrass model
                          Y 2 = X 3 + 27(3B − A2 )x + 27A(2A2 − 9B),
allows us to apply Lemma 5.6 with K = 9N(log N)−κ . It follows that
                                                     
                      +      gcd(x, D) < N(log N)−κ                 1
            # D ∈ D (N) :                       ∗       ≪ N(log N)− 2 κ+6 .
                             for some (x, y) ∈ ED (Z)
This shows that the contribution from those D ∈ D + (N) fits into the upper bound.
  For the contribution from D ∈ D− (N), we simply replace A by −A and consider instead
ED : y 2 = x(x2 − ADx + BD 2 ) with D ∈ D+ (N).                                      

                                             References
 [1] L. Alpöge, The average number of integral points on elliptic curves is bounded. Preprint, 2014.
     arXiv:1412.1047.
 [2] L. Alpöge and W. Ho, The second moment of the number of integral points on elliptic curves is
     bounded. Preprint, 2022. arXiv:1807.03761.
 [3] M. A. Bean, An isoperimetric inequality for the area of plane regions defined by binary forms.
     Compositio Math. 92 (1994), 115–131.
 [4] T. D. Browning, The density of rational points on a certain singular cubic surface. J. Number Theory
     119 (2006), 242–283.
 [5] Y. Bugeaud, Effective simultaneous rational approximation to pairs of real quadratic numbers. Mosc.
     J. Comb. Number Theory 9 (2020), 353–360.
 [6] A. Chambert-Loir and Y. Tschinkel, Igusa integrals and volume asymptotics in analytic and adelic
     geometry. Confluentes Math. 2 (2010), 351–429.
 [7] S. Chan, The average number of integral points on the congruent number curves. Preprint, 2023.
     arXiv:2112.01615.
 [8] S. Chan, Integral points on cubic twists of Mordell curves. Math. Ann., to appear.
 [9] J. E. Cremona, Reduction of binary cubic and quartic forms. LMS J. Comput. Math. 2 (1999),
     64–94.
[10] É. Fouvry and J. Klüners, On the 4-rank of class groups of quadratic number fields. Invent. Math.
     167 (2007), 455–513.
[11] J. Franke, Y. I. Manin and Y. Tschinkel, Rational points of bounded height on Fano varieties. Invent.
     Math. 95 (1989), 421–435.
[12] L. J. Goldstein, A generalization of the Siegel–Walfisz theorem. Trans. Amer. Math. Soc. 149 (1970),
     417–429.
[13] A. Granville, Rational and integral points on quadratic twists of a given hyperelliptic curve. Int.
     Math. Res. Not. IMRN (2007), no. 8, Art. ID 027, 24 pp.
[14] L. Hajdu and T. Herendi, Explicit bounds for the solutions of elliptic equations with rational coeffi-
     cients. J. Symbolic Computation 25 (1998), 361–366.
[15] G. H. Hardy and S. Ramanujan, The normal number of prime factors of a number n. Quart. J.
     Math. 48 (1917), 76–92.
[16] D. R. Heath-Brown, A mean value estimate for real character sums. Acta Arith. 72 (1995), 235–275.
38                            TIM BROWNING AND STEPHANIE CHAN

[17] D. R. Heath-Brown, Diophantine approximation with square-free numbers. Math. Z. (1984) 187,
     335–344.
[18] D. R. Heath-Brown, The size of Selmer groups for the congruent number problem. Invent. Math.
     111 (1993), 171–195.
[19] D. R. Heath-Brown, The size of Selmer groups for the congruent number problem. II. Invent. Math.
     118 (1994), 331–370.
[20] M. Hindry and J. H. Silverman, The canonical height and integral points on elliptic curves. Invent.
     Math. 93 (1988), 419–450.
[21] M. N. Huxley, A note on polynomial congruences. In Recent progress in analytic number theory,
     Vol. 1 (Durham, 1979), pp 193–196, Academic Press, London–New York, 1981.
[22] S. Lang, Conjectured Diophantine estimates on elliptic curves. Arithmetic and geometry, Vol. I,
     155–171, Progr. Math. 35, Birkhäuser Boston, Boston, MA, 1983.
[23] P. Le Boudec, Affine congruences and rational points on a certain cubic surface. Algebra & Number
     Theory 8 (2014), 1259–1296.
[24] L. J. Mordell, Diophantine equations. Pure and Applied Mathematics 30, Academic Press, London–
     New York, 1969.
[25] W. Schmidt, Thue’s equation over function fields. J. Austral. Math. Soc. 25 (1978), 385–422.
[26] J.-P. Serre, Lectures on NX (p). CRC Research Notes in Mathematics 11, CRC Press, Boca Raton,
     FL, 2012.
[27] P. Shiu, A Brun-Titchmarsh theorem for multiplicative functions. J. reine angew. Math. 313 (1980),
     161–170.
[28] A. Smith, The distribution of ℓ∞ -Selmer groups in degree ℓ twist families II. Preprint, 2023.
     arXiv:2207.05143.
[29] J. L. Thunder, Decomposable form inequalities. Ann. of Math. 153 (2001), 767–804.
[30] E. Wirsing, Das asymptotische Verhalten von Summen über multiplikative Funktionen. Math. Ann.
     143 (1961), 75–102.
[31] S. Y. Xiao, Power-free values of binary forms and the global determinant method. Int. Math. Res.
     Not. IMRN 16 (2017), 5078–5135.

     IST Austria, Am Campus 1, 3400 Klosterneuburg, Austria
     Email address: tdb@ist.ac.at
     Email address: stephanie.chan@ist.ac.at
