# On moments of gaps between consecutive squarefree numbers

Tsz Ho Chan

###### Abstract

Let $s_{1},s_{2},s_{3},\cdots$ be the set of squarefree numbers in ascending
order. In this paper, we prove that the following asymptotic on moments of
gaps between squarefree numbers

$\sum_{s_{k+1}\leq x}(s_{k+1}-s_{k})^{\gamma}\sim B(\gamma)x\;\;\mbox{ with
some constant}\;\;B(\gamma)>0$

is true for $0\leq\gamma<3.75$. This improves the previous best range
$0\leq\gamma<3.6875$.

Keywords: Squarefree numbers, gaps, moments. MSC number: 11N25

##  1 Introduction and Main Result

A positive integer is squarefree if it is not divisible by the square of any
prime number. For example, $6$ is squarefree while $12$ is not. Thus, the
first few squarefree numbers, $s_{k}$, are

$s_{1}=1,\;\;s_{2}=2,\;\;s_{3}=3,\;\;s_{4}=5,\;\;s_{5}=6,\;\;s_{6}=7,\;\;s_{7}=10,\;\;\cdots.$

It is well-known that the set of squarefree numbers has asymptotic density
$6/\pi^{2}>1/2$ which implies that there are infinitely many consecutive
squarefree number (i.e. $s_{k+1}-s_{k}=1$ infinitely often). Furthermore, (as
pointed out by Huxley [6]) Mirsky [11] proved that

$\mathop{\sum_{s_{k+1}\leq
x}}_{s_{k+1}-s_{k}=h}1=\alpha(h)x+O\Bigl{(}\frac{hx}{\log x\log\log
x}\Bigr{)}\;\;\mbox{ for any integer }\;\;1\leq h<\frac{\log x\log\log\log
x}{(\log\log x)^{2}}$ (1)

with some constant $\alpha(h)$ independent of $x$ which satisfies

$\log\alpha(h)\leq-\frac{5}{4}h\log\log h+O(h)$ (2)

by [6, Lemma 1]. Using this, Erdős [1] showed the following moment asymptotic
on gaps between successive squarefree numbers:

$\sum_{s_{k+1}\leq x}(s_{k+1}-s_{k})^{\gamma}\sim B(\gamma)x$ (3)

for $0\leq\gamma\leq 2$. Here

$B(\gamma)=\sum_{h=1}^{\infty}h^{\gamma}\alpha(h)$ (4)

which converges by (2). Hooley [5] improved the range of validity of (3) to
$0\leq\gamma\leq 3$. Later, Filaseta [2] and Filaseta and Trifonov [4]
improved it further to $0\leq\gamma<29/9=3.222...$ and
$0\leq\gamma<43/13=3.307...$ respectively by differencing method. The current
best result is due to Huxley [6] and [7] who showed that (3) is true for
$0\leq\gamma<11/3=3.666...$ and $0\leq\gamma<59/16=3.6875$ respectively by
using geometric considerations and results on number of rational points close
to a curve. In this paper, we extend the range further to $0\leq\gamma<3.75$.
In particular, we prove the following theorem which gives (3) for
$0\leq\gamma<3.75$ readily.

######  Theorem 1.

For $0\leq\gamma<3.75$,

$\sum_{x/2<s_{k+1}\leq x}(s_{k+1}-s_{k})^{\gamma}\sim\frac{1}{2}B(\gamma)x$

with $B(\gamma)$ defined by (4).

The paper is organized as follows. First, we will review Huxley’s work [6].
Then, we will refine the treatment of Case 1(a) by using [8] instead of [7].
Finally, we will prove Theorem 1 using a fifth derivative result in [10] in
place of a fourth derivative result in [9] together with finer analysis on
different ranges for $H$. Future improvement relies on better treatment of
Case 2 in Huxley’s work.

Notation. We use $\|x\|$ to denote the distance between $x$ and the nearest
integer, and $|A|$ to denote the number of elements in the set $A$. The
symbols $f(x)=O(g(x))$, $f(x)\ll g(x)$ and $g(x)\gg f(x)$ are equivalent to
$|f(x)|\leq Cg(x)$ for some constant $C>0$. The symbol $f(x)\asymp g(x)$ means
that $f(x)\ll g(x)\ll f(x)$. Finally, $f(x)\sim g(x)$ means that
$\lim_{x\rightarrow\infty}f(x)/g(x)=1$.

##  2 A summary of Huxley’s work

This section highlights some of the key elements in Huxley’s work [6]. With
$s_{k+1}-s_{k}=h+1$, the set of $h$ consecutive integers

$\mathcal{S}:=\\{s_{k}+1,s_{k}+2,...,s_{k+1}-1\\}$

are all non-squarefree. Suppose $\gamma\geq 3$. In view of Mirsky’s asymptotic
formula (1) and the current best bound on gaps between consecutive squarefree
numbers [3], we can focus on $\frac{1}{2}H_{0}\leq h\leq H_{1}$ where

$H_{0}:=\Bigl{(}\frac{\log x}{\log\log x}\Bigr{)}^{1/(\gamma+2)}\;\;\mbox{ and
}\;\;H_{1}:=C_{0}x^{1/5}\log x$

for some constant $C_{0}>0$ (note that $x$ here is the same as $N$ in [6]).
Let $H$ run over powers of $2$ and we basically group the gaps $h$ into dyadic
intervals $[H,2H)$. Define

$P_{0}(H):=\frac{1}{4}H\log H\;\;\mbox{ and }\;\;P_{1}(H):=H^{\gamma}\log H.$
(5)

Huxley classified the gaps $s_{k+1}-s_{k}\geq H+1$ into large-prime gaps and
small-prime gaps. Large-prime gap means that the set $\mathcal{S}$ contains a
number of the form $p^{2}q$ with some prime $p\geq P_{1}(H)$. Small-prime gap
means each subset of $H$ consecutive integers in $\mathcal{S}$ contains at
least $H/4$ numbers of the form $p^{2}q$ with prime $P_{0}(H)\leq p<P_{1}(H)$.
A lemma of Erdős shows that we must have either large-prime gaps or small-
prime gaps. Huxley proved that the contribution from large-prime gaps longer
than $H_{0}$ contributes

$O\Bigl{(}\frac{x}{\log\log x}\Bigr{)}.$ (6)

Let

$F(H,n):=|\\{n<p^{2}q\leq n+H:p\mbox{ is prime and }p\geq P_{0}(H)\\}|$

and

$F(H,P,n):=|\\{n<p^{2}q\leq n+H:p\mbox{ is prime and }P\leq p<2P\\}|$

where $P$ is a power of two. Then a small-prime gap of length greater than $H$
contains a number $n$ with $F(H,n)\geq H/4$ and we also have

$\mathop{\sum\nolimits^{\prime}}_{P}F(H,P,n)\geq\frac{H}{8}$

where $\sum\nolimits^{\prime}$ denotes a sum over powers of two with

$F(H,P,n)\geq\frac{H}{16\gamma\log H}$ (7)

since there are at most $2\gamma\log H$ different powers of two in the
interval $[P_{0}(H)/2,P_{1}(H))$. Following [5] and [2], the set of sextuples

$\\{(p_{1},p_{2},p_{3},q_{1},q_{2},q_{3}):P\leq
p_{1},p_{2},p_{3}<2P,\;\;\frac{1}{2}x\leq
p_{3}^{2}q_{3}<p_{2}^{2}q_{2}<p_{1}^{2}q_{1}\leq\min(x,p_{3}^{2}q_{3}+H-1)\Bigr{\\}}$

was introduced. It follows from (7) that a gap of length greater than $H$
contains a number $n$ such that there are at least

$\frac{H^{3}}{12\times 2^{12}\gamma^{3}\log^{3}H}$

such sextuples from $(n,n+H]$. With $D:=2^{9}(\gamma\log H)^{3/2}$ and
$D^{\prime}:=2D^{2}$, we define

$\displaystyle S(H,P):=\Big{|}\Bigl{\\{}(p_{1},p_{2},p_{3},q_{1},q_{2},q_{3})$
$\displaystyle:P\leq p_{1},p_{2},p_{3}<2P;(q_{1},q_{2},q_{3})\leq
D;(q_{1},q_{2}),(q_{2},q_{3}),(q_{3},q_{1})\leq D^{\prime};$
$\displaystyle\frac{1}{2}x\leq
p_{3}^{2}q_{3}<p_{2}^{2}q_{2}<p_{1}^{2}q_{1}\leq\min(x,p_{3}^{2}q_{3}+H-1)\Bigr{\\}}\Big{|}$

which counts sextuples with certain greatest common divisor conditions on
$q_{i}$’s. With

$T(H,P):=\max_{x/2\leq n\leq x-H}\Big{|}\left\\{1\leq i\leq H:n+i=p^{2}q\mbox{
for some prime }P\leq p<2P\right\\}\Big{|},$

Huxley [6, Lemma 4] established the following lemma.

######  Lemma 1.

For $x$ sufficiently large, we have

$\sum_{x/2<s_{k+1}\leq
x}(s_{k+1}-s_{k})^{\gamma}=\frac{1}{2}B(\gamma)x+O\Bigl{(}\frac{x}{\log\log
x}\Bigr{)}$

provided that, for each powers of two $H$ and $P$ in the ranges

$\frac{1}{2}\Bigl{(}\frac{\log x}{\log\log x}\Bigr{)}^{1/(\gamma+2)}\leq H\leq
C_{0}x^{1/5}\log x\;\;\mbox{ and }\;\;\frac{1}{4}H\log H\leq P\leq
H^{\gamma}\log H,$

we have either

$T(H,P)<\frac{H}{64\gamma\log H},$ (8)

or a bound for $S(H,P)$ in one of the following forms:

$S(H,P)=O\Bigl{(}\frac{x}{H^{\gamma-3}\log^{6}H}\Bigr{)},$ (9)

or for some $\eta>0$ and some $P^{\prime}\leq P$, which may depend on $H$ but
not on $P$,

$S(H,P)=O\Bigl{(}\frac{x}{H^{\gamma-3}\log^{5}H}\Bigl{(}\frac{P^{\prime}}{P}\Bigr{)}^{\eta}\Bigr{)},$
(10)

or for some $\eta>0$ and some $P^{\prime}\geq P$, which may depend on $H$ but
not on $P$,

$S(H,P)=O\Bigl{(}\frac{x}{H^{\gamma-3}\log^{5}H}\Bigl{(}\frac{P}{P^{\prime}}\Bigr{)}^{\eta}\Bigr{)}.$
(11)

The implied constants depend on $\gamma$ and $\eta$.

Next, $S(H,P)$ was bounded in two stages. Firstly, for fixed primes $P\leq
p_{1},p_{2},p_{3}<2P$, he studied the number of integer vectors
$\vec{q}=(q_{1},q_{2},q_{3})$ that would give a sextuple
$(p_{1},p_{2},p_{3},q_{1},q_{2},q_{3})$ counted in $S(H,P)$. Secondly, for $K$
a power of two, he considered $S(H,P,K)$, the number of triplets of primes
$p_{1},p_{2},p_{3}$ with the number of such vectors $\vec{q}$ lying in the
range $K$ to $2K-1$. Note that

$S(H,P)\leq\sum_{K}2K\;S(H,P,K)$

where $K$ is over powers of two. Then, Huxley broke it up

$S(H,P,K)=S_{1}(H,P,K)+S_{2}(H,P,K)+S_{3}(H,P,K)$

into three cases based on some geometric considerations. It was shown that

$\sum_{K}KS_{3}(H,P,K)\ll\frac{H^{2}x}{P^{3}\log^{3}P}\;\;\mbox{ which
satisfies (\ref{S2}) with $\eta=3$ for $\gamma<4$},$ (12)
$\sum_{K}KS_{2}(H,P,K)\;\;\mbox{ satisfies (\ref{S2}) with $\eta=\frac{3}{2}$
for }\;P\gg H^{(2\gamma-4)/3}\log^{7/3}H,$ (13)

and

$\sum_{K}KS_{2}(H,P,K)\;\;\mbox{ satisfies (\ref{S3}) with $\eta=\frac{1}{2}$
for }\;P\ll\frac{x}{H^{2\gamma-3}\log^{5}H}.$ (14)

The bottleneck comes from Case 1 which consists of vectors $\vec{q}$ that are
multiples of some primitive vector $\vec{r}=(r_{1},r_{2},r_{3})$. It was shown
that

$S_{1}(H,P,K)\leq\frac{3H}{K}S^{\prime}(H,P,K)$

where $S^{\prime}(H,P,K)$ is the number of ordered sets of integers
$p_{1},p_{2},r_{1},r_{2}$ with $P\leq p_{1},p_{2}<2P$ distinct,

$\frac{x}{16K}\leq p_{1}^{2}r_{1},p_{2}^{2}r_{2}\leq\frac{x}{K}\;\;\mbox{ and
}\;\;1\leq p_{1}^{2}r_{1}-p_{2}^{2}r_{2}\leq\frac{H}{K}.$

By dropping one dimension, Case 1 was further subdivided into Case 1(a) and
Case 1(b) depending on a parameter $L$ which counts the number of different
integer vectors $(r_{1},r_{2})$. Hence, with slightly different notation from
[6],

$\displaystyle S^{\prime}(H,P,K)=$ $\displaystyle
S^{\prime}_{a}(H,P,K)+S^{\prime}_{b}(H,P,K),$ $\displaystyle S_{1}(H,P,K)=$
$\displaystyle S_{1a}(H,P,K)+S_{1b}(H,P,K),$ $\displaystyle S_{1}(H,P)=$
$\displaystyle S_{1a}(H,P)+S_{1b}(H,P).$

by breaking into (a) and (b) subcases (Note: Huxley used the notation
$S_{1}^{\prime}(H,P,K)$, $S_{2}^{\prime}(H,P,K)$, $S_{11}(H,P)$, $S_{12}(H,P)$
instead of $S_{a}^{\prime}(H,P,K)$, $S_{b}^{\prime}(H,P,K)$, $S_{1a}(H,P)$,
$S_{1b}(H,P)$ here). Also, for $L$ a power of $2$, one has

$S^{\prime}_{a}(H,P,K)\leq\sum_{L}2L\;S^{\prime}_{a}(H,P,K,L)\;\;\mbox{ and
}\;\;S^{\prime}_{b}(H,P,K)\leq\sum_{L}2L\;S^{\prime}_{b}(H,P,K,L)$

where $S^{\prime}_{a}(H,P,K,L)$ and $S^{\prime}_{b}(H,P,K,L)$ are the number
of pairs of primes in Case 1(a) or Cae 1(b) respecitvely for which there are
between $L$ and $2L-1$ vectors $(r_{1},r_{2})$. From the definition of $D$ and
$D^{\prime}$, we have

$K\ll\log^{3/2}H\;\;\mbox{ and }\;\;L\ll\log^{3}H$

in Case 1 by the construction of $S(H,P)$ in [6]. It was shown in [6, page
200] that

$\sum_{K}KS_{1b}(H,P,K)\ll\frac{H^{6/5}x^{3/5}}{\log^{12/5}P}\mbox{ which
satisfies (\ref{S1}) for }\;\gamma<3.8.$ (15)

##  3 Improvement on Case 1(a)

Case 1(a) amounts to bounding the number of quadruples $(p_{1},p_{2},t,u)$
satisfying

$1\leq|p_{1}^{2}t-p_{2}^{2}u|\leq\frac{H}{KL}\;\;\mbox{ with }1\leq
t,u\leq\frac{\sqrt{2}x}{KLP^{2}}\mbox{ and }P\leq p_{1},p_{2}<2P.$ (16)

In [6], a lemma based on Dirichlet interchange was used to obtain the range
$\gamma<11/3=3.666...$. Later in [7], a theorem on rational points close to a
curve was proved to obtain the slightly better range $\gamma<59/16=3.6875$.
Here we shall apply a result in [8].

######  Proposition 1.

Given real numbers $\lambda>0$, $C\geq 3/2$, $M\geq 2$ and $Q\geq 2$. Suppose
$F(x)$ is a real-valued function $2d+2$ times continuously differentiable on
the interval $[0,1]$ with

$|F^{(r)}(x)|\leq\lambda C^{r+1}$

for $r=0,1,2,...,2d+2$,

$|D_{r,s}(F(x))|\geq\Bigl{(}\frac{\lambda}{C^{r+1}}\Bigr{)}^{s}$

for $r=s=d$ and $r=d+1$, $s=1,2,...,d+1$ where

$D_{r,s}(F(x))=\det\Bigl{(}\frac{F^{(r+i-j)}(x)}{(r+i-j)!}\Bigr{)}_{s\times
s}.$

Let $S$ be the set of rational points $(m/n,r/q)$ with $0\leq m\leq n$, $1\leq
n\leq M$, $1\leq q\leq Q$, $(m,n)=1=(r,q)$ that satisfies
$|F(m/n)-r/q|\leq\delta$. Let $T=\lambda Q^{2}$ and $\Delta=\delta Q^{2}$ with
$\Delta<1/2$ and $T\geq 4$. Then

$|S|\ll\bigl{(}((1+\Delta^{1/d}M^{2})M^{2d}T)^{1/(2d+1)}+\Delta^{1/(2d+1)}M^{2}\bigr{)}(MT)^{\epsilon}+(\Delta^{d^{2}+2d-1}T^{d(d-1)})^{1/(d(d+1)(2d-1))}M^{2}$

for any $\epsilon>0$. The implied constant may depend on $C$ and $\epsilon$.
In the special case of $d=1$ and $\lambda=1$, one has

$|S|\ll\bigl{(}(MQ)^{2/3}+\delta^{1/3}(MQ)^{4/3}\bigr{)}\log MQ.$ (17)

We also need a simple inequality.

######  Lemma 2.

For any non-negative real numbers $a$, $b$ and $c$,

$\min(a,b+c)\leq\min(a,b)+\min(a,c).$ (18)

###### Proof.

One simply observes that

$\min(a,b)+\min(a,c)=\min(a+a,b+a,a+c,b+c)=\min(a+\min(a,b,c),b+c)\geq\min(a,b+c)$

as $a,b,c$ are all non-negative. ∎

Without loss of generality, we may assume that $p_{1}>p_{2}$ in (16). Hence,
it suffices to consider

$0<\Big{|}\frac{p_{1}^{2}}{p_{2}^{2}}-\frac{u^{\prime}}{t^{\prime}}\Big{|}\leq\frac{H}{KLP^{2}t^{\prime}v}\;\;\mbox{
with }1\leq t^{\prime}\leq
u^{\prime}\leq\frac{\sqrt{2}x}{KLP^{2}v},(u^{\prime},t^{\prime})=1,\mbox{ and
}P\leq p_{2}<p_{1}<2P$

after canceling the greatest common divisor $v=(u,t)$. The above is included
in

$0<\Big{|}\sqrt{\frac{u^{\prime}}{t^{\prime}}}-\frac{p_{1}}{p_{2}}\Big{|}\leq\frac{H}{KLP^{2}\sqrt{u^{\prime}t^{\prime}}v}\;\;\mbox{
with }1\leq t^{\prime}\leq
u^{\prime}\leq\frac{\sqrt{2}x}{KLP^{2}v},(u^{\prime},t^{\prime})=1,\mbox{ and
}P\leq p_{2}<p_{1}<2P.$ (19)

We divide $t^{\prime}$ into dyadic intervals $[T^{\prime},2T^{\prime})$. Note
that as $1<\frac{p_{1}}{p_{2}}\leq\frac{2P-1}{P}$ and
$\frac{H}{KLP^{2}\sqrt{u^{\prime}t^{\prime}}v}\leq\frac{4}{P\log H}$, we have
$T^{\prime}\leq t^{\prime}\leq u^{\prime}\leq 4t^{\prime}$ and
$T^{\prime}\leq\sqrt{u^{\prime}t^{\prime}}\leq 4T^{\prime}$. We are going to
apply (17) to

$F(u)=\left\\{\begin{array}[]{l}\sqrt{1+u}\\\ \sqrt{2+u}\\\
\sqrt{3+u}\end{array}\right.\mbox{ with
}\lambda=1,\;\;C=100,\;\;Q=2P,\;\;M=2T^{\prime}\leq\frac{\sqrt{2}x}{KLP^{2}v},\;\;\delta=\frac{H}{KLP^{2}T^{\prime}v}$

depending on whether $0\leq u=\frac{u^{\prime}-t^{\prime}}{t^{\prime}}\leq 1$,
or $1\leq u=\frac{u^{\prime}-t^{\prime}}{t^{\prime}}\leq 2$, or $2\leq
u=\frac{u^{\prime}-t^{\prime}}{t^{\prime}}\leq 3$. One can check that the
derivative conditions in Proposition 1 are satisfied. The condition
$\Delta<1/2$ is satisfied when

$T^{\prime}>\frac{8H}{KLv}.$

Under this condition, (17) gives an upper bound

$O\Bigl{(}\Bigl{(}T^{\prime
2/3}P^{2/3}+\frac{H^{1/3}T^{\prime}P^{2/3}}{K^{1/3}L^{1/3}v^{1/3}}\Bigr{)}\log
x\Bigr{)}$

for the number of rational number solutions to (19). This, in turn, gives

$S_{a}^{\prime}(H,P,K,L)\ll\Bigl{(}\frac{x}{KLP^{4/3}}+\frac{H^{1/3}x}{K^{4/3}L^{4/3}P^{4/3}}\Bigr{)}\log
x$ (20)

after summing over dyadic intervals $[T^{\prime},2T^{\prime})$ and $v$. When
$T^{\prime}\leq\frac{8H}{KLv}$, one simply applies Lemma 7 in [6] to get the
bound

$S_{a}^{\prime}(H,P,K,L)\ll\frac{H^{2}\log x}{K^{2}L^{2}}.$ (21)

Combining (20) and (21), we have

$S_{a}^{\prime}(H,P,K,L)\ll\frac{H^{2}\log x}{K^{2}L^{2}}+\frac{x\log
x}{KLP^{4/3}}+\frac{H^{1/3}x\log x}{K^{4/3}L^{4/3}P^{4/3}}.$

Then, following page 201 in [6],

$\displaystyle S_{1a}(H,P,K)\ll$
$\displaystyle\frac{H}{K}S^{\prime}_{a}(H,P,K)\ll\frac{H}{K}\sum_{L}L\;S_{a}^{\prime}(H,P,K,L)$
$\displaystyle\ll$
$\displaystyle\frac{H}{K}\sum_{L}\min\Bigl{(}\frac{LP^{2}}{\log^{2}P},\frac{H^{2}\log
x}{K^{2}L^{2}}+\frac{x\log x}{KLP^{4/3}}+\frac{H^{1/3}x\log
x}{K^{4/3}L^{4/3}P^{4/3}}\Bigr{)}$ $\displaystyle\ll$
$\displaystyle\frac{H}{K}\sum_{L}\Bigl{[}\frac{H^{2}\log
x}{K^{2}L^{2}}+\min\Bigl{(}\frac{LP^{2}}{\log^{2}P},\frac{x\log
x}{KLP^{4/3}}+\frac{H^{1/3}x\log x}{K^{4/3}L^{4/3}P^{4/3}}\Bigr{)}\Bigr{]}$
$\displaystyle\ll$ $\displaystyle\frac{H^{3}\log
x}{K^{3}}+\frac{H}{K}\min\Bigl{(}P^{2}\log P,\frac{x\log
x}{KP^{4/3}}+\frac{H^{1/3}x\log x}{K^{4/3}P^{4/3}}\Bigr{)}$

by Lemma 2 and $L\ll\log^{3}H$. By Lemma 2, $\min(a,b)\leq
a^{\alpha}b^{1-\alpha}$ with $\alpha=2/5$ and $K\ll\log^{3/2}H$, we have

$\displaystyle S_{1a}(H,P)\ll$ $\displaystyle\sum_{K}K\;S_{1a}(H,P,K)$
$\displaystyle\ll$ $\displaystyle H^{3}\log x+H\sum_{K}\min\Bigl{(}P^{2}\log
P,\frac{x\log x}{KP^{4/3}}\Bigr{)}+H\sum_{K}\min\Bigl{(}P^{2}\log
P,\frac{H^{1/3}x\log x}{K^{4/3}P^{4/3}}\Bigr{)}$ $\displaystyle\ll$
$\displaystyle H^{3}\log x+H\min\Bigl{(}P^{2}\log^{5/2}P,\frac{x\log
x}{P^{4/3}}\Bigr{)}+H\min\Bigl{(}P^{2}\log^{5/2}P,\frac{H^{1/3}x\log
x}{P^{4/3}}\Bigr{)}$ $\displaystyle\ll$ $\displaystyle H^{3}\log
x+Hx^{3/5}\log^{8/5}x+H^{6/5}x^{3/5}\log^{8/5}x\ll H^{6/5}x^{3/5}\log^{8/5}x$

as $H\ll x^{1/5}\log x$. This implies

$\sum_{K}KS_{1a}(H,P,K)\;\mbox{ satisfies (\ref{S1}) for }\;\gamma<3.8.$ (22)

##  4 Proof of Theorem 1

Instead of a result of Huxley and Sargos [9] as used in [6], we use its
improvement [10, Theorem 5].

######  Proposition 2.

Let $0<\delta\leq 1/4$ and $M\geq 4$. Suppose $f:[M,2M]\rightarrow\mathbb{R}$
has $r$ continuous derivatives with $|f^{(r)}(u)|\asymp\lambda_{r}$ for $M\leq
u\leq 2M$ with some real numbers $\lambda_{r}>0$. Define

$\mathcal{R}(f,\delta)=|\\{m\in[M,2M]\cap\mathbb{Z}:\|f(m)\|\leq\delta\\}|.$

Then, for $r\geq 5$,

$\mathcal{R}(f,\delta)\ll
M\lambda_{r}^{\frac{2}{r(r+1)}}+M\delta^{\frac{2}{(r-1)(r-2)}}+\Bigl{(}\frac{\delta}{\lambda_{r-1}}\Bigr{)}^{\frac{1}{r-1}}+1.$

###### Proof of Theorem 1.

Suppose $3\leq\gamma<3.8$. Then, (12), (15) and (22) imply that the
contributions from $S_{1}(H,P,K)$ and $S_{3}(H,P,K)$ towards $S(H,P)$ satisfy
(9) or (10). From (13) and (14), the contribution from $S_{2}(H,P,K)$ towards
$S(H,P)$ satisfies (10) or (11) when

$H\leq x^{\frac{3}{8\gamma-13}}/\log^{22}x$ (23)

as the two intervals $P\gg H^{(2\gamma-4)/3}\log^{7/3}H$ and
$P\ll\frac{x}{H^{2\gamma-3}\log^{5}H}$ would overlap.

Now, we try to make (8) to hold. For $x/2\leq n\leq x$, consider the function
$f_{n}(u)=n/u^{2}$ with $P\leq u<2P$. With $M=P$ and $\delta=H/P^{2}$, we have

$T(H,P)\ll\max_{x/2\leq n\leq x}\mathcal{R}(f_{n},\delta)\ll
x^{1/15}P^{8/15}+H^{1/6}P^{2/3}+\frac{H^{1/4}P}{x^{1/4}}$ (24)

by Proposition 2 with $r=5$. One can check that the above first upper bound is
$<\frac{H}{192\gamma\log H}$ when $P\leq\frac{H^{15/8}}{x^{1/8}\log^{2}H}$,
the second upper bound is $<\frac{H}{192\gamma\log H}$ when
$P\leq\frac{H^{5/4}}{\log^{2}H}$, and the third upper bound is
$<\frac{H}{192\gamma\log H}$ when $P\leq\frac{H^{3/4}x^{1/4}}{\log^{2}H}$.
Hence, (8) holds unless

$P>\frac{H^{15/8}}{x^{1/8}\log^{2}H},\;\;\frac{H^{5/4}}{\log^{2}H}\;\;\mbox{
or }\;\;\frac{H^{3/4}x^{1/4}}{\log^{2}H}.$ (25)

If $P>\frac{H^{5/4}}{\log^{2}H}$, then $P\gg H^{(2\gamma-4)/3}\log^{7/3}H$ for
$\gamma<3.875$. This would imply $S(H,P)$ satisfies (9), (10) or (11) by (12),
(15), (22) and (13).

If $P>\frac{H^{3/4}x^{1/4}}{\log^{2}H}$, then $P\gg
H^{(2\gamma-4)/3}\log^{7/3}H$ for $\gamma<5$. This would imply $S(H,P)$
satisfies (9), (10) or (11) by (12), (15), (22) and (13).

Finally, if $P>\frac{H^{15/8}}{x^{1/8}\log^{2}H}$, then $P\gg
H^{(2\gamma-4)/3}\log^{7/3}H$ when $H>x^{\frac{3}{77-16\gamma}}\log^{7}x$ as
$\gamma<3.8$. So, when $H>x^{\frac{3}{77-16\gamma}}\log^{7}x$, $S(H,P)$
satisfies (9), (10) or (11) by (12), (15), (22) and (13). When $H\leq
x^{\frac{3}{77-16\gamma}}\log^{7}x$, $H$ satisfies (23) as long as
$\gamma<3.75$. Thus, when $\gamma<3.75$, $S(H,P)$ satisfies (9), (10) or (11)
regardless the size of $H$.

Therefore, when $3\leq\gamma<3.75$, one of the conditions in Lemma 1 is
satisfied and we have Theorem 1. ∎

## References

  * [1] P. Erdős, Some problems and results in elementary number theory, Publ. Math. Debrecen 2 (1951), 103–109.
  * [2] M. Filaseta, On the distribution of gaps between square-free numbers, Mathematika 40 (1993), 87–100.
  * [3] M. Filaseta and O. Trifonov, On gaps between squarefree numbers II, J. London Math. Soc. (2) 45 (1992), 323–333.
  * [4] M. Filaseta and O. Trifonov, The distribution of fractional parts with applications to gap results in number theory, Proc. London Math. Soc. (2) 3 (1996), 241–278.
  * [5] C. Hooley, On the distribution of square-free numbers, Canadian J. Math. 25 (1973), 1216–1223.
  * [6] M.N. Huxley, Moments of differences between square-free numbers, Sieve methods, exponential sums, and their applications in number theory (Cardiff, 1995), London Math. Soc. Lecture Note Ser., 237, Cambridge Univ. Press, Cambridge (1997), 235–253.
  * [7] M.N. Huxley, The rational points close to a curve II, Acta Arith. 93 (2000), no. 3, 201–219.
  * [8] M.N. Huxley, The rational points close to a curve IV, Proceedings of the Session in Analytic Number Theory and Diophantine Equations, 36 pp., Bonner Math. Schriften, 360, Univ. Bonn, Bonn, 2003.
  * [9] M.N. Huxley and P. Sargos, Points entiers au voisinage d’une courbe plane de classe $C^{n}$, Acta Arith. 69 (1995), 359–366.
  * [10] M.N. Huxley and P. Sargos, Points entiers au voisinage d’une courbe plane de classe $C^{n}$ II, Functiones et Approximatio 35 (2006), 91–115.
  * [11] L. Mirsky, Arithmetical pattern problems related to divisibility by $r$th powers, Proc. London Math. Soc. 50 (1949), 497–508.

Mathematics Department
Kennesaw State University
Marietta, GA 30060
<EMAIL_ADDRESS>


# A Chat About Boring Problems: Studying GPT-based text normalization

###### Abstract

Text normalization - the conversion of text from written to spoken form - is
traditionally assumed to be an ill-formed task for language models. In this
work, we argue otherwise. We empirically show the capacity of Large-Language
Models (LLM) for text normalization in few-shot scenarios. Combining self-
consistency reasoning with linguistic-informed prompt engineering, we find LLM
based text normalization to achieve error rates around 40% lower than top
normalization systems. Further, upon error analysis, we note key limitations
in the conventional design of text normalization tasks. We create a new
taxonomy of text normalization errors and apply it to results from
GPT-3.5-Turbo and GPT-4.0. Through this new framework, we can identify
strengths and weaknesses of GPT-based TN, opening opportunities for future
work.

Index Terms—  Text-normalization, GPT, large-language-models, in-context
learning, finite state automata, text-to-speech

##  1 Introduction

Fig. 1: Example of text normalization across semiotic classes. The same
semiotic token (”1/4”) has distinct normalizations depending on context.

Text normalization (TN) is an essential prepossessing step for text-to-speech
generation. While the majority of character-pronunciation mappings may be
learned from upstream grapheme-to-phoneme (G2P) or forced alignment, many
orthographic symbols require contextual knowledge for successful
verbalization. For example, consider the string ”1/4” (as seen in Figure 1).
Depending on context, pronunciation can vary between ”January the fourth” and
”a quarter”. Such types of meaning-dependent tokens are often referred to as
semiotic tokens and their TN context as semiotic classes [1]. Common examples
of semiotic classes would be cardinal digits, dates, fractions, and time.

Two notorious limitations of TN as a language processing task are the scarcity
of paired training data available and need for high (if not perfect) accuracy.
The former is due to the infeasibility of covering all potential semiotic
tokens in context (e.g. a dataset for all cardinal strings). The latter stems
from the low fault-tolerant scenarios where these tokens occur (Engineering,
Finance, Medicine) [2]. In such cases, the creation of ’unrecoverable errors’,
such as hallucination of an additional number or misreading of a currency
symbol, can have disastrous consequences. As such, most production level
systems, such as Google’s Kestrel, rely on hand-coded weighted finite-state
grammars (WFST) [3, 4]. These limitations on a seemingly trivial task has led
Richard Sproat – one of the modern pioneers of TN - to claim, ”until one can
solve ’boring’ problems like this [TN] using purely AI methods, one cannot
claim that AI is a success [..] Various groups have tried, but so far nobody
has eliminated the problem of unrecoverable errors.” [5, 6, 3]

In this paper, we issue a challenge to Sproat [5]. We argue that true
”unrecoverable” errors are, in fact, minimal for state-of-the-art language
modeling methods. Rather, the issue lies in the documentation of TN errors. We
believe TN requires a more nuanced error taxonomy beyond the binary of
’correct’ and ’unrecoverable’. We introduce a granular label schema for GPT
based TN (GPT-TN) error categorization, along with a simple labeling tool for
analysis via the NeMo Text-Processing toolkit [7]. Using GPT-3.5-Turbo and
GPT-4.0, we evaluate TN performance over few-shot prompting and consistency
reasoning scenarios. Our analysis is as follows:

  * •

GPT-TN outperforms Kestrel, a state-of-the-art WFST-based TN system, by 40%
percent

  * •

Manual error analysis shows true ”unrecoverable” GPT-TN errors to be near non-
existent

  * •

GPT-TN productions outperform Kestrel’s normalization in conventional speech
scenarios

##  2 Method

###  2.1 Error Taxonomy

We first motivate our rationale for a TN error taxonomy. One notes our
definition of TN does not require an injective relation. In Figure 1, the date
”1/4” may be verbalized as ”January the fourth” or ”the fourth of January”
without changing meaning. However, normalization as ”the day after January the
third” would be perceived as incorrect - despite being grammatically and
semantically equivalent.

This phenomenon relates to the linguistic notion of felicity. Broadly,
felicitous statements are the subset of grammatical sentences that are
contextually permissible (with infelicitous statements being the disjoint set)
[8]. While in specific contexts only one sentence may be felicitous, other
contexts permit many equivalent substitutions. In our analysis of TN errors,
we find several cases where errors relate to felicity. We note two cases: (1)
felicity regarding sentential context and (2) felicity in regards to semiotic
class.

Consider TN for a US telephone number;

> Text: 312-236-2012 a: three twelve two thirty six twenty twelve b: three one
> two two three six two zero one two

Both strings are felicitous (for American English) in regards to the intended
sentential meaning. Yet, were a to be taken as a gold example, b would be
treated as an error. As such, the failure to account for felicity at the
sentence level produces a false negative. An effective analysis of TN would
need to account for this variation. In contrast, consider:

> Text: b. 03-02-2001 c: born march second two thousand one d: b zero three
> zero two two thousand one

Absent context, both c and d are valid normalizations, However, only c is
acceptable for a date of birth and thus d is infelicitous. Yet, d still
retains the original textual information and is thus preferable to other false
productions (i.e. it is not ’unrecoverable’). A proper TN analysis would seek
to note this distinction between errors.

It is the above reasoning that motiavates us to introduce error categories for
GPT-TN analysis. They allow us to distinguish felicity related errors from
those stemming from natural LLM behavior (i.e. noisy text-correction,
translation of foreign words, hallucinations). In total, our analysis
identifies six label categories (along with the binary ’Correct’ and
’Incorrect’ labels) for TN. They are:

  * •

format: Errors derived from infelicitous normalization regarding semiotic
class.

  * •

paraphrase: Replacement or reordering of words, or substitution of acronyms
with full wording. (e.g. ”happily he danced” $\rightarrow$ ”he danced
happily.”)

  * •

fix: Grammar or spelling correction of a noisy sample. (e.g. ”he sleep
yesterday” $\rightarrow$ ”he slept yesterday”.)

  * •

artifact: Introduction of non-original text due to idiosyncratic behavior of
LLM prompting (e.g. Prepending (”Sure, I can do that”).

  * •

translation: Normalization of a string in a non-English sentence sample. (e.g.
”Louis XIV était roi de france” $\rightarrow$ ”Louis quatorze était roi de
france”.)

  * •

other: Misc. category covering complete corruption of original sentence.
Includes, but is not exclusive or unique to, ’unrecoverable errors.’

Fig. 2: GPT normalization and evaluation pipeline.

###  2.2 Dataset

For experiments, we use the Google TN dataset [9]. Comprised of around 1.1
billion words from Wikipedia, it is one of the few publicly available English
TN datasets and provides sizeable coverage of common semiotic classes.
Individual tokens are paired with semiotic class and a target normalization
generated with Google’s Kestrel TN system [3].

For development, we use 1000 sentences from the provided development set.
Final test evaluations are performed over the entire test set, comprised of
7551 sentences. As Kestrel is designed for TTS, the dataset includes several
artifacts such as ”sil” and special suffixes for single character. We remove
these as a prepossessing step.

###  2.3 Experiments

We compare GPT-3.5-Turbo and GPT-4.0 LLMs (March 1st and current release,
respectively) against Google’s Kestrel system. For all but the final accuracy
results, we solely evaluate GPT-3.5-Turbo on the first 1000 samples from the
development set.

We seed models for normalization through the completion API, providing user
examples in the schema ”Normalize: {EXAMPLE}” and target normalization as
sample conversation turns. We experiment with several prompting approaches.
From the training dataset, we sample 1) random pairs of written-normalization
sentences 2) written-normalization semiotic token pairs, one for each class
(see [1] for list of all classes) with surrounding sentence context and 3)
semiotic token pairs, one for each class, without surrounding context. For 2)
and 3), we experiment with varying the number of samples per semiotic class
(r=1,2,3). For 1), we simply sample the same total quantity of examples for
all variations of 2).

After prompting experiments, we choose the best two configurations and augment
performance using self-consistency reasoning as in [10]. We poll for 20
completion outputs over a temperature of 0.5 and use majority voting to
determine final output. After evaluating over the development set, we use the
best consistency+prompting configuration pair for test evaluation using both
GPT-3.5-Turbo and GPT-4.0. (See GPT-TN normalization pipeline in Figure 2.)

##  3 Results

###  3.1 Evaluation

Prior to final evaluation, we filter out irrelevant variations between target
and prediction samples. We remove common GPT insertions (”No need for
normalization”, ”This sentence seems to be incomplete”) and filter obvious
non-English samples using regex search. Simple felicitous variations (such as
”August fourth” vs. ”fourth of August”) are corrected using a WFST-grammar. We
also use a short pre-defined dictionary to correct for differences in UK/US
spelling. Finally, we screen for variations in punctuation and article
insertion.

For final accuracy results, we perform manual evaluation with our error
taxonomy. This is done through an HTML-based tool (see Figure 3) to
efficiently label the remaining test cases with error types as described in
Section 2.1.

Fig. 3: HTML error labeling tool. ”Source” is written form, ”target” is
Kestrel’s normalization and ”predict” is GPT’s normalization.

###  3.2 Final Performance

Table 2 shows GPT-3.5-Turbo’s exact accuracy on the development set without
manual labeling. Sampling two sentences per semiotic class in context yields
the highest accuracy of 91.1% after automatic evaluation. After self-
consistency the accuracy improves to 92.1%.

We use this inference recipe to evaluate GPT-3.5-Turbo and GPT-4.0 over the
test dataset. (see Table 3.) From GPT-3.5.-Turbo’s 692 errors after automatic
evaluation, manual labeling found only 264 to be actual errors. (see Section
2.1). GPT-4.0 significantly improves results, reducing the initial 540 errors
after automatic evaluation to only 108 errors.

The 540 test cases where GPT-4.0 differs from Kestrel after automatic
evaluation we also manually analyzed for Kestrel’s normalization quality. With
174 errors, we found GPT-4.0 makes 40% less errors than Kestrel, mainly
attributed to the infelicitous normalization category (”format”).

##  4 Discussion

We first note that self-consistency polling and semiotic class coverage is
critical for improved downstream performance. Both GPT-3.5-Turbo and GPT-4.0
greatly benefit from these methods. Interestingly, there appears to be a
saturation point of sample quantity, with both models deteriorating in
performance with r=3 classes across all sampling methods. We surmise this is
likely due to the ’lost in the middle’ phenomenon [11]: essential context for
normalization can be lost over large token spans. This is likely why ’w/o
context’ sampling can remain competitive, with the lack of real context
dependencies permitting scaling.

As seen in the disparity between Table 2 and Table 3, the introduction of an
error taxonomy is critical for TN analysis. We see that among all models,
infelicitous normalizations (’format’) made up the vast majority of errors.
Actual ”unrecoverable” errors made up less than 1% of all total normalizations
from the GPT-4.0 model. While this is still 8x the number in Kestrel, we note
that this factor may be misleading. Our analysis showed that several supposed
errors were due to contamination in either source data or target predictions
(see Table 1). As such, the slight rise in unrecoverable errors belies GPT-
TN’s ability to correct for data contamination.

Input: 2007 i triple e conference
---
GPT [acceptable]: two o o seven i e e e conference
Target: two o o seven i triple e conference.
Input: http : //web.archive.org
GPT [wrong]: h t t p : / / w e b . a r c h i v e . o r g
Target: h t t p : slash slash web dot archive dot org
Input/target: it was originally mooted
GPT[wrong]: it was originally suggested
Input: mcmath , p .267
GPT [wrong]: mcmath , p two  hundred sixty seven
Target: mcmath , p point two six seven
Input: student stories of 9/11
GPT [correct]: student stories of  nine eleven
Target [wrong]: student stories of  nine elevenths
Input: ch .2 document 75
GPT [correct]: chapter two document seventy five
Target [wrong]: chains point two document seventy five
Input [wrong]: more than rs.10 , 00 , 000 , 00
GPT [correct]: more than  ten crore annual business
Target [wrong]: more than ten  rupees , o o , o o o , o o
Table 1: Examples of GPT-4.0 normalizations errors. Target normalizations are
generated from Google’s Kestrel Text Normalization system.

Further, upon comparison of felicitous productions by GPT-4.0 against Kestrel,
we found many of the former’s productions to be of better quality. While both
Kestrel and GPT-4.0 provided recoverable normalizations, the latter’s was of
greater quality and more colloquial.

Taking in both qualitative and quantitative observations, we conclude that
GPT-TN provides both more accurate and higher quality normalizations than
WFST-based methods. In particular, the former excels in cases where the range
of felicitous normalizations is particularly high. Even in cases of error, the
rate of ’unrecoverable’ errors is minor. Though in cases of zero-tolerance,
Kestrel still has a slight edge.

##  5 Conclusion

We empirically demonstrate the effectiveness of GPT-TN for at-scale text-
normalization. After careful analysis of TN errors, we find that modern LLMs
can outperform rule-based normalization systems by 40%, with minuscule
instances of ”unrecoverable” normalization errors. We show that GPT-TN outputs
are of higher quality and can self-correct for corrupted inputs.

Further, we demonstrate a need for greater nuance in TN analysis. TN outputs
can cover a wide range of felicitous targets and are ill-served by binary
label schemes. We encourage future work to explore refinements to this
taxonomy to develop even more effective TN systems.

Prompt Samp. Method | r=1 | r=2 | r=3
---|---|---|---
w/ context | 88.8/91.1 | 91.1/92.1 | 90.5
w/o context | 89.8 | 90.4/91.5 | 89.8
Rand. | 87.1 | 88.7 | 88.9
Table 2: Sentence level normalization accuracy over prompting techniques for GPT-3.5-Turbo. Evaluation is performed over first 1000 samples of Google TN development set. First number represents % accuracy based on the corresponding prompt sampling method and number of examples (r) per semiotic class (”Rand.” samples equivalent total samples as ”w/ context”). Second number (if provided) is the % accuracy after self-consistency via majority voting (N=20 responses; t=0.5 temperature). Error Type | GPT-3.5 | GPT-4.0 | Kestrel
---|---|---|---
Errors (Post Auto) | 692 | 540 | 540*
Errors (Post Manual) | 264 | 108 | 174
Foreign Language | 29 | 11 | 26
Format | 173 | 62 | 143
Paraphrase | 26 | 10 | 1
Fix | 2 | 9 | 0
Artifact | 19 | 9 | 3
Other | 15 | 7 | 0
Final Accuracy | .965 | .986 | .977
Unrecoverable Errors | N/A | 8 | 1
Table 3: Breakdown of normalization errors by label type for GPT-3.5-Turbo,
GPT-4.0 and the WSFT-based Kestrel TN. Errors ’(Post Auto)’ and ’Errors (Post
Manual)’ refer to errors found after automatic evaluation and further after
manual analysis, respectively. Kestrel errors are derived by manual error
analysis of target normalizations of GPT-4.0 errors.

## References

  * [1] Paul Taylor,  Text-to-Speech Synthesis,  Cambridge University Press, 2009.
  * [2] Hao Zhang, Richard Sproat, Axel H Ng, Felix Stahlberg, Xiaochang Peng, Kyle Gorman, and Brian Roark,  “Neural models of text normalization for speech applications,”  Computational Linguistics, 2019.
  * [3] Peter Ebden and Richard Sproat,  “The kestrel tts text normalization system,”  Natural Language Engineering, 2015.
  * [4] John E. Hopcroft, Rajeev Motwani, and Jeffrey D. Ullman,  Introduction to Automata Theory, Languages, and Computation (3rd Edition),  Addison-Wesley Longman Publishing Co., Inc., USA, 2006.
  * [5] Richard Sproat,  “Boring problems are sometimes the most interesting,”  Computational Linguistics, vol. 48, no. 2, pp. 483–490, June 2022.
  * [6] Richard Sproat,  “Lightly supervised learning of text normalization: Russian number names,”  in IEEE Spoken Language Technology Workshop, 2010.
  * [7] Yang Zhang, Evelina Bakhturina, and Boris Ginsburg,  “NeMo (Inverse) Text Normalization: From Development to Production,”  in Interspeech, 2021.
  * [8] John L. Austin,  How to do things with words,  William James Lectures delivered at Harvard University in 1955. Harvard University Press, Cambridge, Massachusetts, second edition. edition, 1975 - 1975.
  * [9] Richard Sproat and Navdeep Jaitly,  “An RNN model of text normalization,”  in Interspeech, 2017.
  * [10] Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou,  “Self-consistency improves chain of thought reasoning in language models,”  arXiv preprint arXiv:2203.11171, 2022.
  * [11] Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang,  “Lost in the middle: How language models use long contexts,”  arXiv preprint arXiv:2307.03172, 2023.