1 Introduction

The problem of giving (sharp) upper bounds for the number of powers among N consecutive terms of an arithmetic progression is a classical one with many deep results and open problems and conjectures. Here we only give a brief introduction; for a more precise account of the topic the interested reader may consult e.g. the papers [1] and [6].

Let \(a,b,\ell \) be integers with \(a>0\) and let \(\ell \ge 2\). Write \(P_{a,b;N}(\ell )\) for the number of \(\ell \)-th powers among the first N terms of the arithmetic progression \(ax+b\) \((x\ge 0)\). Denote by \(P_N(\ell )\) the maximum of these values taken over all arithmetic progressions \(ax+b\). (Note that this maximum obviously exists.) The case of squares (i.e, \(\ell =2\)) has been studied by many authors. Erdős [3] conjectured and Szemerédi [10] proved that \(P_N(2)=o(N)\). Later, by deep tools (such as e.g. elliptic and higher genus curves, Falting’s theorem, the distribution of primes etc.) Bombieri, Granville and Pintz [1] proved \(P_N(2)<O(N^{2/3+o(1)})\), which subsequently was improved to \(P_N(2)<O(N^{3/5+o(1)})\) by Bombieri and Zannier [2]. See also Granville [5] for related results and remarks. A strong conjecture of Rudin (see [9], end of paragraph 4.6) predicts that \(P_N(2)=O(\sqrt{N})\), or in an even more precise form, that

$$\begin{aligned} P_N(2)=P_{24,1;N}(2)=\sqrt{\frac{8}{3}N}+O(1)\ \ \ (N\ge 6) \end{aligned}$$
(1)

should hold.

In case \(\ell \ge 3\) there is hardly anything known. The authors of [1] noted (without proof) that their methods probably make it possible to prove \(P_N(3)\ll N^{3/5+\varepsilon }\) and \(P_N(\ell )\ll N^{1/2+\varepsilon }\) \((\ell \ge 4)\). Hajdu and Tengely [6] showed that (up to equivalence) for any \(\ell \ge 2\) there is a unique arithmetic progression \(ax+b\) which contains the most \(\ell \)-th powers asymptotically, that is, which maximizes the expression

$$\begin{aligned} \lim \limits _{N\rightarrow \infty }\frac{|\{x:ax+b\ \text {is an}\ \ell \text {-th power},\ 0\le x<N\}|}{\root \ell \of {N}}. \end{aligned}$$

(In fact, for \(\ell =4\) there are two such progressions.) They could describe these arithmetic progressions \(a_\ell x+b_\ell \) explicitly. Based upon their results, they extended Rudin’s conjecture (1) for any \(\ell \ge 2\) (by replacing \(24x+1\) by \(a_\ell x+b_\ell \) and changing the right hand side accordingly), and proved that for \(\ell =3,4\) for certain small values of N. Note that this asymptotic (’global’) version of the problem is simpler than the original ’local’ one, namely when we concentrate on a finite part of the progressions. The reason is that the asymptotic approach brings in an ’averaging’ effect, which roughly speaking makes it possible to concentrate on a complete (finite) period of a progression \(ax+b\) modulo a.

In this note we prove that for any positive \(\varepsilon \) there is an \(\ell _0\) depending only on \(\varepsilon \) such that for \(\ell >\ell _0\) the number of \(\ell \)-th powers among the first N terms of any integral arithmetic progression is below \((1+\varepsilon )\root \ell \of {N}\), provided that N is large enough in terms of \(\varepsilon ,\ell \) and the parameters of the progression. The important feature of \(\ell _0\) is that it is uniform in the sense that it depends only on \(\varepsilon \), it is independent of the progression. This result is sharp in the sense that for infinitely many \(\ell \), one can find a constant \(c_1=c_1(\ell )>1\) and an arithmetic progression having more than \(c_1\root \ell \of {N}\) \(\ell \)-th powers among its first N terms, for all N large enough. We also give a uniform, sharp upper bound for the number of powers (with not fixed exponents) among the first N terms of arithmetic progressions. In our proofs we combine a classical result of Wigert [11] concerning the number of divisors of positive integers, a recent result of Hajdu and Tengely [6] concerning arithmetic progressions containing the most \(\ell \)-th powers asymptotically, and a new assertion answering a question of Hajdu and Tengely from [6].

2 New results

Now we give our main results. We use the notation from the introduction.

Theorem 2.1

For every \(\varepsilon >0\) there is an \(\ell _0\) depending only on \(\varepsilon \) such that for any \(\ell >\ell _0\) we have \(P_{a,b;N}(\ell )\le (1+\varepsilon )\root \ell \of {N}\), whenever \(N>N_0\). Here \(N_0=N_0(\varepsilon ,\ell ,a,b)\) depends on \(\varepsilon ,\ell ,a,b\).

Remarks. The above theorem is sharp in the sense that \(1+\varepsilon \) cannot be replaced by 1, and \(\ell >\ell _0\) is also necessary. Indeed, Theorem 1 of [6] (see also the Remarks after it) implies that for infinitely many exponents \(\ell \ge 2\) there exists a \(\delta _\ell >0\) and an arithmetic progression \(a_\ell x+b_\ell \) with \(P_{a_\ell ,b_\ell ;N}(\ell )>(1+\delta _\ell )\root \ell \of {N}\) for all \(N>N_0\). Here \(N_0=N_0(\ell )\) depends only on \(\ell \).

It is clear that if an arithmetic progression \(ax+b\) contains an \(\ell \)-th power then it contains infinitely many, and we have

$$\begin{aligned} P_{a,b;N}(\ell )>\frac{1}{2a}\root \ell \of {N} \end{aligned}$$

for \(N>N_0\), where \(N_0\) depends on ab.

We also mention that on our way to prove Theorem 2.1, we answer a question of Hajdu and Tengely [6] (see Proposition 3.1).

We also give a uniform upper bound for the number of powers in arithmetic progressions. For this, let \(P_{a,b;N}(*)\) denote the number of (arbitrary) powers among the first N terms of the arithmetic progression \(ax+b\) \((x\ge 0)\).

Theorem 2.2

Let \(ax+b\) \((x\ge 0)\) be an arithmetic progression. Then for any \(\varepsilon >0\) there exists an \(N_0\) such that

$$\begin{aligned} P_{a,b;N}(*)<\left( \sqrt{\frac{8}{3}}+\varepsilon \right) \sqrt{N} \end{aligned}$$
(2)

for any \(N>N_0\). Here \(N_0=N_0(\varepsilon ,a,b)\) depends only on \(\varepsilon ,a,b\).

Remark

One can easily check (see also e.g. Theorem 1 of [6]) that

$$\begin{aligned} \lim \limits _{N\rightarrow \infty } \frac{P_{24,1;N}(2)}{\sqrt{N}}=\sqrt{\frac{8}{3}}. \end{aligned}$$

This shows that the above result is sharp.

Further, it is also easy to see that if \(\gcd (a,b)=1\) then there exist infinitely many exponents \(\ell \) such that \(ax+b\) contains \(\ell \)-th powers. Note that here the condition \(\gcd (a,b)=1\) cannot be dropped: for example, the arithmetic progression \(4x+2\) \((x\ge 0)\) contains no powers at all.

3 Proofs

To prove Theorem 2.1 we shall need some known and new assertions. The next lemma is a result of Hajdu and Tengely [6]. For its formulation, we need to introduce some new notions and notation (which will play important roles also later on). For any \(\ell \ge 2\) and arithmetic progression \(ax+b\) put

$$\begin{aligned} M_{a,b}(\ell ):=|\{u:0\le u<a,\ u^\ell \equiv b\pmod {a}\}| \end{aligned}$$

and \(S_{a,b}(\ell ):=M_{a,b}(\ell )a^{\frac{1}{\ell }-1}\).

Lemma 3.1

For any \(\ell \ge 2\) and for any arithmetic progression \(ax+b\) we have \(S_{a,b}(\ell )\le S(\ell )\), where

$$\begin{aligned} S(\ell )= {\left\{ \begin{array}{ll} \sqrt{\frac{8}{3}},&{}\quad \text {if}\ \ell =2,\\ \underset{\frac{\log p}{\log p-\log (p-1)}>\ell }{\prod \limits _{p\ \text {prime},\ p-1\mid \ell ,}} (p-1)p^{\frac{1}{\ell }-1},&{}\quad \text {otherwise}. \end{array}\right. } \end{aligned}$$

Proof

The statement is the first half of Theorem 1 of [6]; see also the notation in its proof on p. 970 of [6]. \(\square \)

Remark

The inequality \(S_{a,b}(\ell )\le S(\ell )\) is sharp: for any \(\ell \), by an appropriate choice of \(ax+b\) (given in [6]) we get equality. Observe that for \(\ell \) odd, we have \(S(\ell )=1\).

In the proofs of Theorems 2.1 and 2.2 we shall need the following new assertion. This answers a question of Hajdu and Tengely concerning the limit of the sequence \(S(\ell )\) (see the ’concrete question’ on p. 966 in the Remarks after Theorem 1 in [6]), and we find it of possible independent interest.

Proposition 3.1

By the notation of Lemma 3.1, for any \(\gamma >0\) there exists an \(\ell _1=\ell _1(\gamma )\) depending only on \(\gamma \) such that for \(\ell >\ell _1\) we have

$$\begin{aligned} S(\ell )<\exp \left( \ell ^{-1+\gamma }\right) . \end{aligned}$$
(3)

In particular, \(\lim \limits _{\ell \rightarrow \infty } S(\ell )=1\) holds.

Remark

One can easily check that (3) implies that

$$\begin{aligned} S(\ell )<1+2\ell ^{-1+\gamma } \end{aligned}$$

for \(\ell \) large enough.

To prove the above statement, we need the next classical theorem concerning the number of divisors d(n) of a positive integer n.

Lemma 3.2

If \(\varepsilon >0\), \(X>X_0(\varepsilon )\) then we have

$$\begin{aligned} \max \limits _{n\le X} d(n) <\exp \left( (\log 2+\varepsilon )\frac{\log X}{\log \log X}\right) . \end{aligned}$$

Proof

This is a classical result of Wigert [11]. Note that in [7], p. 56 a stronger form of this assertion is given, however, the above inequality is sufficient for our present purposes. \(\square \)

Proof of Proposition 3.1

As one can easily check by a direct calculation, the function \((t-1)t^{1/\ell -1}\) is strictly monotone increasing for \(t>0\), for any fixed \(\ell \ge 3\). Thus, as for \(\ell \ge 3\) the product appearing in \(S(\ell )\) has at most \(d(\ell )\) terms and in every term \(p\le \ell +1\) holds, we have

$$\begin{aligned} 1\le S(\ell ) \le \left( \ell (\ell +1)^{1/\ell -1}\right) ^{d(\ell )}<\left( \root \ell \of {\ell } \right) ^{d(\ell )}. \end{aligned}$$

Here we also used that by the condition \(\frac{\log p}{\log p-\log (p-1)}>\ell \), the terms appearing in \(S(\ell )\) are greater than 1. Now by Lemma 3.2 we get that

$$\begin{aligned} S(\ell )< & {} \exp \left( \frac{d(\ell )\log \ell }{\ell }\right)<\exp \left( \frac{\exp \left( {\frac{\log \ell }{\log \log \ell }}\right) \log \ell }{\ell }\right) \\= & {} \exp \left( \exp \left( {\frac{\log \ell }{\log \log \ell }+\log \log \ell -\log \ell }\right) \right) <\exp (\ell ^{-1+\gamma }) \end{aligned}$$

hold, for any \(\gamma >0\) with \(\ell >\ell _1\), where \(\ell _1=\ell _1(\gamma )\) depends only on \(\gamma \). Thus the first part of the statement is proved. The second part of the claim, taking any \(\gamma \) with \(0<\gamma <1\), from this immediately follows. \(\square \)

Now we can give the

Proof of Theorem 2.1

To bound \(P_{a,b;N}(\ell )\), we need to give an upper bound for the number of \(\ell \)-th powers among the numbers

$$\begin{aligned} b,a+b,\dots ,a(N-1)+b. \end{aligned}$$

In view of that \(N_0\) depends on ab, we may assume that \(a(N-1)+b\ge 0\). An \(\ell \)-th power \(u^\ell \) belongs to the above terms if its size is ’between’ b and \(a(N-1)+b\), and \(u^\ell \equiv b\pmod {a}\). Thus we see that

$$\begin{aligned} P_{a,b;N}(\ell )\le \left( \root \ell \of {aN+|b|}+\root \ell \of {|b|}\right) \frac{M_{a,b}(\ell )}{a}+M_{a,b}(\ell ). \end{aligned}$$

Here the term in brackets on the right hand side provides an upper bound for the number of (consecutive) integers (forming an interval I) with \(\ell \)-th power of the ’appropriate’ size, the factor \(M_{a,b}(\ell )/a\) is the ratio of \(\ell \)-th powers in the residue class \(b \pmod {a}\), while the last term is to bound the number of possible \(\ell \)-th powers in the progression coming from the last part of I (having less than a elements). This yields

$$\begin{aligned} P_{a,b;N}(\ell )\le M_{a,b}(\ell )a^{\frac{1}{\ell }-1}\root \ell \of {N}\left( \root \ell \of {1+\frac{|b|}{aN}}+\root \ell \of {\frac{|b|}{aN}}+\frac{a}{\root \ell \of {aN}}\right) . \end{aligned}$$
(4)

Let \(\varepsilon >0\) arbitrary. Clearly, there exists an \(N_1=N_1(\varepsilon ,\ell ,a,b)\) depending on \(\varepsilon ,\ell ,a,b\) such that for \(N>N_1\) we have

$$\begin{aligned} \root \ell \of {1+\frac{|b|}{aN}}+\root \ell \of {\frac{|b|}{aN}}+\frac{a}{\root \ell \of {aN}}<1+\frac{\varepsilon }{2}. \end{aligned}$$

By Lemma 3.1 this together with (4) implies

$$\begin{aligned} P_{a,b;N}(\ell )<\left( 1+\frac{\varepsilon }{2}\right) S(\ell )\root \ell \of {N}. \end{aligned}$$
(5)

In view of Proposition 3.1 we can take an \(\ell _0\) such that

$$\begin{aligned} S(\ell )<\frac{2+2\varepsilon }{2+\varepsilon } \end{aligned}$$

for \(\ell >\ell _0\). This by (5) yields that

$$\begin{aligned} P_{a,b;N}(\ell )<(1+\varepsilon )\root \ell \of {N} \end{aligned}$$

under the assumptions made for \(\ell \) and N. Hence our claim follows. \(\square \)

Now we give the

Proof of Theorem 2.2

Throughout the proof we use the phrase ’N is large enough’ to express that N is larger than an appropriate bound depending only on \(\varepsilon ,a,b\).

Combining (4) and Lemma 3.1 we obtain

$$\begin{aligned} P_{a,b;N}(2)<\left( \sqrt{\frac{8}{3}}+\frac{\varepsilon }{2}\right) \sqrt{N} \end{aligned}$$
(6)

for \(\ell =2\) and

$$\begin{aligned} P_{a,b;N}(\ell )<S(\ell )(a+3)\root \ell \of {N} \end{aligned}$$

for \(\ell \ge 3\), respectively, for N large enough. In view of Proposition 3.1, the latter assertion implies that there exists an absolute constant C such that

$$\begin{aligned} P_{a,b;N}(\ell )<C(a+3)\root \ell \of {N} \end{aligned}$$
(7)

for any \(\ell \ge 3\), for N large enough. Further, if N is large enough then we have \(aN+b\ge |b|\). Hence if \(u^\ell \) with \(|u|>1\) belongs to \(ax+b\) \((0\le x<N)\) then we have

$$\begin{aligned} \ell \le \frac{\log (aN+|b|)}{\log 2}. \end{aligned}$$

(If \(u\in \{-1,0,1\}\), then we may assume that \(\ell \le 3\).) This together with (6) and (7) gives

$$\begin{aligned} P_{a,b;N}(*)\le & {} \sum \limits _{2\le \ell \le \frac{\log (aN+|b|)}{\log 2}}P_{a,b;N}(\ell )=P_{a,b;N}(2)+\sum \limits _{3\le \ell \le \frac{\log (aN+|b|)}{\log 2}}P_{a,b;N}(\ell )\\< & {} \left( \sqrt{\frac{8}{3}}+\frac{\varepsilon }{2}\right) \sqrt{N}+C(a+3)\frac{\log (aN+|b|)}{\log 2}\root 3 \of {N}<\left( \sqrt{\frac{8}{3}}+\varepsilon \right) \sqrt{N} \end{aligned}$$

for N large enough. This proves the statement. \(\square \)