{'fraction_non_alphanumeric': 0.06427767957576731, 'fraction_numerical': 0.02319352938025604, 'mean_word_length': 3.5140232108317213, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Asymptotics and formulas for cubic exponential sums

Several asymptotic expansions and formulas for cubic exponential sums are derived. The expansions are most useful when the cubic coefficient is in a restricted range. This generalizes previous results in the quadratic case and helps to clarify how to numerically approximate cubic exponential sums and how to obtain upper bounds for them in some cases.


Introduction
Let a denote an integer, q a positive integer, b an integer relatively prime to q and e(x) := e 2πix . Bombieri and Iwaniec analyzed in [1] the cubic exponential sum (1) N <n≤2N e an + bn 2 q + µn 3 , This was part of their breakthrough method to bound the maximal size of the Riemann zeta function on the critical line. In view of the importance of these sums it is of interest to study the generalized sum (2) N n=0 e an + bn 2 2q e αn + βn 2 + µn 3 , where α, β and µ are real numbers. We give asymptotic expansions and formulas for this sum that are perhaps most useful when the cubic coefficient µ is small enough, satisfying µ ≪ N −2 . Our motivation comes in part from an algorithm to compute the zeta function derived in [4] where the essential ingredient was a method for numerically evaluating sums of the form N n=0 e αn + βn 2 + µn 3 , µ ≪ N −2 .
In particular, these asymptotics could improve the practicality of this method by enabling the use of an explicit asymptotic expansion instead of precise numerical computations when appropriate. Furthermore, as a by-product we obtain upper bounds for cubic sums. These results are influenced by the work of Bombieri and Iwaniec in [1], and the work of Fiedler, Jurkat and Körner in [3]. The latter obtained asymptotic expansions for quadratic exponential sums that yield a rough approximation for such sums (typically accurate to within square-root of the length).
We introduce some notation first. Let [x] := ⌊x + 1/2⌋ denote the nearest integer to x, sgn(x) := 1 or −1 according to whether x ≥ 0 or x < 0, and 1 C the indicator function of whether the condition C is satisfied. For integer k, define k * := −kk 2 where kk ≡ 1 (mod q) subject to the additional condition that 4|k if q is odd, and let δ := 0 or 1 according to whether bq is even or odd. These definitions of k * and δ come directly from the formula for a complete Gauss sum in [3, Lemma 1]. Furthermore, let δ 1 = 0 or 1 according to whether bq + a is even or odd.
Define the Gauss sum which has modulus 1 or 0, according to whether bq is even or not. It is well-known that this sum has a closed-form evaluation in terms of the Kronecker symbol. In addition, define where if N is negative then the summation range is taken over N ≤ n ≤ 0. Note that in contrast to the sum (2), H N (α, β, µ) does not incorporate rational approximations for the linear and quadratic arguments explicitly. We write h 1 (x) = O(h 2 (x)), or equivalently h 1 (x) ≪ h 2 (x), when there is an absolute constant C 1 such that |h 1 (x)| ≤ C 1 h 2 (x) for all values of x under consideration (which will usually make a set of the form x ≥ x 0 ).
Using conjugation if necessary we may restrict to µ ≥ 0. In fact, we will assume µ > 0, otherwise one reduces to the quadratic sums already treated in [3]. With this in mind, the basic results are given in Propositions 8.1, 8.2 and 8.7 in Section 8. These propositions furnish transformation formulas for cubic exponential sums including explicit error bounds. As special cases we give in the next few paragraphs several formulas and asymptotic expansions for cubic sums that are meant to be interesting specializations. Theorem 1.1 below is a specialization of Proposition 8.1. The theorem isolates a main term for the cubic sum H N (α, β, µ) and says, roughly, that H N (α, β, µ) splits into the product of an "arithmetic factor" which is (mostly) determined by rational approximation to α and β, times an "analytic factor" determined by the error in said approximation and by µ and N .
where the arithmetic factor D ℓ (a, b, q) is give by The Diophantine conditions on α and β appearing in the theorem can always be fulfilled via the Dirichlet approximation theorem and using a continued fractions algorithm (though the denominator q that arises for a generic β can be of the same order as N ). Hence, the theorem can be applied with any α and β, provided that µ is small enough. If η ≥ 0 or η ≤ −3µN , on the one hand, then exactly one of the D ℓ terms can possibly be nonzero. Moreover, if η ≥ 0 then Ω ⊂ {0, 1}, while if η ≤ −3µN then Ω ⊂ {0, −1}. On the other hand, if −3µN < η < 0 then at most two of the D ℓ terms can possibly be nonzero and Ω ⊂ {0, 1, −1}. For example, if η ≥ 0 and v = 0, which is a typical situation, then Note that if δ 1 = 0 then D 0 (a, b, q) = 0, and so there is no main term in this case.
Remark. If we let f (x) = ǫx+ηx 2 +µx 3 for a minute, then in the notation of the next Theorem 1.2 is a specialization of Proposition 8.1 also, and provides a van der Corput type iteration for H N . Using the periodicity relation e(z + 1) = e(z) we may restrict α, β and µ to the interval [−1/2, 1/2), where we have 0 < µ as before. In view of this, the length |N ′ | of the transformed sum will be smaller than the length N of the original sum provided that β and µ are small enough.
The term 1 β>0 / √ β in the remainder arises from estimating boundary terms B in Proposition 8.1 when β > 0, while 1 β<0 / −(β + 3µN ) arises from estimating B when β < −1/N ; see proof of theorem in Section 9. Additionally, one can replace 1/ √ β with min(N, 1/ √ β) and similarly for 1/ −(β + 3µN ). Of course, both of these terms can be removed if B is included explicitly in the theorem. The term (µN 2 + µ 2 N 5 )/ |β| in the remainder comes from estimating derivatives of H N (α, β, µ) with respect to α trivially. Therefore, if one is interested in understanding the rough size of H N (α, β, µ) rather than derive an asymptotic expansion, then it is better to bound these derivatives using partial summation, which yields where and c 3 and c 4 are absolute nonnegative constants.
Interestingly, one can apply the estimate (7) repeatedly until one of the conditions required by Theorem 8.2 fails. This might yield useful bounds for H N in some applications. Also, if desired, the last theorem and corollary can both be written in a more symmetric form by using the change of variableH N (α, β, µ) := H N (α, β/2, µ), which enables absorbing the various powers of 2 that accompany β.
Our last example is a corollary of Proposition 8.7. This proposition furnishes a transformation formula for cubic sums when α = β = 0 and with rational approximations included explicitly, which was the type of sum considered in [1].
Proofs of Theorems 1.1 & 1.2 are given in Section 9. We suggest few improvements to these theorems in Section 10. The remaining sections are devoted for proving the propositions in Section 8.

An initial transformation
Given a sequence of complex numbers {a n } and a set S ⊂ Z, we follow the notation in [3] and define To analyze this sum we will make heavy use of a truncated Airy-Hardy integral We will also make use of the complete Gauss sum We begin by applying the Poisson summation to decompose C(N ; a, b, q; f ). In doing so, only half of the boundary terms at n = 0 and n = N are included, giving the term (1 + B)/2 in Equation (17) below. Then Remark. To avoid notational clutter, we suppressed some parameter dependencies; e.g. we have s m = s m (α, β, µ, q), g(m) = g(a, b, q; m), and B = B(N ; a, b, q; f ).
Proof. Divide the sum along residue class modulo 2q, which gives Apply the Poisson summation formula (see e.g. [2, Page 14]) to each inner sum, followed by the change of variable t ← h + 2qt. The inner sum is thus equal to Substituting (19) into (18), then recalling the Gauss sum definition (13), we obtain Furthermore, by [3, Lemma 1], The integral on the r.h.s. of (20) has a saddle point (i.e. a point t To isolate the contribution of this saddle point, we follow [1] expanding f (t) − mt/(2q) around t = −ω. This has the advantage that f ′′ (−ω) = 0 and will help unify the subsequent analysis in terms of the Airy-Hardy integral.
With this in mind, let y = t + ω, appeal to the identity which is a Taylor expansion of the l.h.s. around t = −ω, and use the change of variable y ← t + ω. This leads to the formula Substituting formulas (23) and (21) into (20), and recalling the definitions of B m and c 1 immediately yields the lemma.

Analysis of the transformed sum
The integral AH(ω, N ; µ, s m ) in (17) is treated according to the following cases.
(1) If the integrand in AH(ω, N ; µ, s m ) contains one interior saddle point; i.e. if the derivative 3µt 2 − 3s vanishes exactly once over t ∈ (ω, ω + N ), then the main term in our evaluation of AH(ω, N ; µ, s m ) will given by the completed Airy-Hardy integral AH(µ, s) or its conjugate AH(µ, s). (2) If there are two interior saddle points, then the main term will be given by the completed Airy integral AI(µ, s) = AH(µ, s) + AH(µ, s). (3) If there are saddle points at the edge of the integration interval (i.e. at t = ω or t = ω + N ), then a special treatment is required. (4) Last, in the absence of a saddle point, AH(ω, N ; µ, s m ) will be estimated via lemmas 4.2 and 4.3 in [5], or using integration by parts. With this in mind, let (Note that · − N is not a norm since it does not satisfy the usual triangle inequality, but a "reversed" inequality.) The quadratic polynomial f ′ (x) achieves its minimum at x = −ω. Using this and the earlier assumption Note that f ′ − N and f ′ + N are continuous in ω.
Let us split the range of summation in (17) into three intervals determined by the points , noting that by definition M 1 ≤ M 2 . In addition, we will make use of It might enlighten matters at this point to refer to the van der Corput iteration in [4]. If ω > 0, then the derivative f ′ (x) is strictly increasing on [0, N ]. So, taking a = b = 0 in the cubic sum C(N ; a, b, q; f ), the van der Corput iteration reads In contrast, when −N < ω < 0, the form of the van der Corput iteration is significantly different because f ′ (x) is not strictly monotonic but has a minimum at x = −ω, so both saddle points −ω ± s m /µ could fall in (0, N ). Explicitly, if 0 ≤ s m ≤ µ min{ω 2 , (ω + N ) 2 } then the integral AH(ω, N ; µ, s m ) has two saddle points (counted with multiplicity). Now, recalling that s m = µω 2 +(m/2−qα)/(3q), the condition s m ≥ 0 is met precisely when m ≥ 2qf ′ (−ω) = 2q f ′ − N , and so certainly when m > M 1 . Moreover, since −N < ω < 0 by assumption, Hence, the condition s m ≤ µ min{ω 2 , (ω + N ) 2 } is met precisely when This motivates defining Last, we will use the boundary set We will use the following lemmas in the sequel.
Lemma 4.2 in [5]. Let F (x) be a real differentiable function such that F ′ (x) is monotonic, and Lemma 4.4 in [5]. Let F (x) be a real twice differentiable function such that

Terms with no saddle point
We will have have two treatments for the terms with no saddle point. Define the first tail of the sum in (17)  In lemmas 4.1 and 4.3 we bound Υ 1 , and in Lemma 4.2 we bound Υ 2 . In both cases, we will use the following integration by parts formula: Let Starting with Υ 1 , and taking u = ω and v = N in the above formula, we are motivated to write and the summation is done by pairing the terms for m and −m whenever possible (as was decreed in Section 2). This sum is convergent at x = ω and x = ω + N , which is seen on dividing the sum along residue classes modulo 2q and using the periodicity of e(g(m)) and 1 m∈E modulo 2q; see the proof of Lemma 4.3 for details.
Proof. If m ∈ [M 1 , M 2 ], then µt 2 − s m does not vanish over t ∈ [ω, ω + N ], which is seen on noting that 6q(µ(ω + t) 2 − s m ) = 2qf ′ (u) − m and using the definitions of M 1 and M 2 . Therefore, we can apply the integration by parts formula (37) to AH(ω, N ; µ, s m ). The function 1/(µt 2 − s m ) 2 that arises is monotonic over ω ≤ t ≤ 0 and 0 ≤ t ≤ ω + N , separately. This is seen on noting that the derivative We thus obtain that the integral on the r.h.s. of (37) is bounded by where the extra 2 in front is because we consider the real and imaginary part of e(µt 3 − 3s m t) separately when applying partial summation. Using partial summation once again, this time to remove the t from each integral in (39), we obtain, on applying Lemma 4.2 in [5], that the expression in (39) is Writing t = ω + u with 0 ≤ u ≤ N , and recalling the definitions of s m and ω, gives Combining (40), (41), and the observation µ(2|ω| + N ) = 2|β|/3 + µN , we see that the expression in (40) is bounded by Now, by definition, M 1 − 1/2 ≤ 2qf ′ (u) ≤ M 2 + 1/2 over 0 ≤ u ≤ N . Moreover, m ∈ E is either always odd or always even. Hence, We isolate the term corresponding to j = 0 in the last sum, and note that the function 1/(q + 2x + 1/2) 3 is decreasing. This gives, on comparing the sum to an integral, that the sum on the r.h.s. of (43) is bounded by Substituting this into (43), then back into (42), yields the lemma.
Proof. Note that µt 2 − s m is monotonic over each of [ω, 0] and [0, ω + N ]. So we can apply Lemma 4.2 in [5] in each interval separately to deduce that Write t = ω + u, where 0 ≤ u ≤ N , then proceed as in the proof of Lemma 4.1 to arrive at the same formula (41), and ultimately the estimate Next, we isolate the term corresponding to j = 0, and bound the remaining sum by an integral, i.e. we obtain the bound (47) 4q + 2q Substituting this into (46) proves the claim.
We now consider the sizes ofΦ ω andΦ ω+N . To this end, let us introduce the quantity which will serve to "symmetrize" the summation interval below. This choice of M max is a little arbitrary since we need only ensure that M max ≥ |M 1 − q| and M max ≥ |M 2 + q|.
Put together, inserting the estimates (53) and (51) into (49) shows thatΦ ω is bounded by 1/2 times the r.h.s. expression in the statement of the lemma. The other 1/2 comes fromΦ ω+N , which satisfies this same bound asΦ ω as can be seen via the same method employed so far.

Terms with one saddle point
If ω < −N , then the same bound holds but with AH(µ, s m ) instead of AH(µ, s m ).
Proof. The proof of the first bound, i.e. when −N/2 < ω ≤ 0, follows analogously as in the proof of Lemma 5.1 for the case ω > 0. The proof of the second bound, i.e. when −N ≤ ω ≤ −N/2, also follows as in Lemma 5.1 but for the case ω < −N .

An alternative bound for the tail
We may consider the tails Υ 1 and Υ 2 in Section 4 together, and apply the method of Lemma 4.1 to both of them. This has the effect of adding more terms to the functionΦ in Section 4 and gives an error term that still goes to zero as β and µ go to zero but with an extra factor of q 3 .
Explicitly, rather than apply Lemma 4.2 in [5] to each term in Υ 2 immediately, we first apply integration by parts followed by an application of Lemma 4.2 in [5] then proceed similarly to the proof of Lemma 4.1. This yields the following bound: Define which similar to (38) except it involves the additional terms m ∈ (M 1 , M 1 + q] and m ∈ (M 2 , M 2 + q].
One may also use integration by parts to execute the proofs of the lemmas in Section 5 and Section 6. This would add yet more terms to the function Φ o ω+x , enlarging the range of summation to all m ∈ Ω = {M 1 , M 2 , M * }.
In view of the previous two lemmas, we are motivated to define which accounts for the terms φ ω and φ ω+N , and which accounts for the term φ 0 . The numerator in these definitions is inserted because φ x will be multiplied by e(g(m) + ωm/2q) according to the formula in Lemma 2.1; see (16).

Formulas for the transformed sum
In summary, we have proved the following. Define and defineT m the same way as T m except that AH(µ, s m ) is replaced by its conjugate while e(ωm/2q + g(m)) is kept the same. Moreover, define the boundary term To clarify the behavior of the main sum M below, we refer to Lemmas 8. 3 & 8.4. Also, estimates for B are provided in Lemma 8.6.
where the main sum M is equal to where the remainder term R 1 satisfies the bound Note that the remainder R 1 satisfies R 1 ≪ q(|β| + µN + log M max + log 2q); in particular, R 1 does not tend to zero as β and µ tend to zero. However, by incorporating more lower order terms using the lemmas in Section 7 we can obtain a remainder term that tends to zero with β and µ but that depends more heavily on q; namely, we obtain a remainder of size ≪ (|β| + µN )q 3 .
and (79) Lemma 8.3. If s > 0, then Proof. By a change of variable t ← µ 1/3 t, we obtain Proof. This follows from the definitions of M 1 , M 2 and M * .
Lemma 8.5. Suppose that q = 1, a = 0 and 3|m − α|µ/β 2 ≤ 1 − ǫ 1 < 1. If β > 0 or β < −1/N then Moreover, Lemma 8.6. We have Proof. The bounds when ω > 0 or ω < −N follow from Lemma 4.4 in [5] and on considering that two terms contribute to B in these cases. When −N ≤ ω ≤ 0, there are at most three terms contributing to B. Write AH(ω, N ; µ, s) = N 0 e µt 3 − wt 2 dt where the prime on the sum means that the boundary terms at n = 0 and N are weighted by 1/2. If w = 0, i.e. if µ < 1/(12qN 2 ), then the two integrals on the r.h.s. are equal and one of them is dropped.

Proofs
Proof of Theorem 1.1. This is a special case of Proposition 8.1 when the intervals (M 1 , M * ) and (M * , M 2 ) are empty, so M = 0 and the only terms that survive are the boundary terms B.

Suggested improvements
One might be able to remove the log(|N ′ | + 2) term appearing in the O-notation in Theorem 1.2 by using Proposition 8.2 instead of Proposition 8.1 to derive the theorem. The former proposition incorporates secondary terms Φ(x) and Y (x) which may be estimated more precisely and it has a remainder R 2 that tends to zero with β and µ. Similarly, one might be able to remove log(2q) factor from the remainder in Theorem 1.1 by using Proposition 8.2 instead of Proposition 8.1. Both improvements will require careful and substantial analysis of the functions Φ(x) and Y (x). e.g. one probably should divide the sum in Φ(x) along arithmetic progressions modulo 2q so as to express Φ(x) as a linear combination of Hurwitz-Lerch zeta functions then apply known asymptotics for the latter.
Additionally, it might be desirable to derive a version of the bound (7) where instead of H max N (α, β, µ) we use the function (83) max N2 n=0 e(αn + βn 2 + µn 3 ) , which offers some advantages; e.g. if we start with α = 0 then new α (in the transformed sum) will still be zero. Finally, although we have not done so for the results stated in the introduction, all the implicit constants appearing there can be made explicit if desired by using the explicit error bounds in Section 8.