0

Let $A,B$ be two positive numbers, I wonder how to show the following estimate

$$\sum_{A\le p \le A+B, (p,q)=1} 1 = \frac{B\varphi(q)}{q}+\ O(q^{\epsilon})$$

for any $\epsilon > 0$ and positive integer $q$.

The formula looks intuitively quite true, since $\frac{\varphi(q)}{q}$ is like the "frequency" of number of integers coprime to $q$ and $B$ is just the length of the interval. But I have no idea how to give the error term. $O(q^{\epsilon})$ may or may not be optimal, I don't know.

If the proof is well-known but too long, please feel free to let me know the reference. (The problem might be just in thr book of Apostol but I can't find it)

JMP
  • 22,637
No One
  • 8,465
  • Do the $p$'s in the sum are restricted to primes or just integers in $[A, A+B]$? (Also, I think the range of the summation should be $[A, A+B)$ not $[A, A+B]$.) – Seewoo Lee Jun 20 '21 at 04:38
  • 1
    @SeewooLee Just integers, clearly. I agree that $[A,A+B)$ is more natural, but $[A,A+B]$ is equally correct: the error is $\le 1$ which can be subsumed into the error term. – Erick Wong Jun 20 '21 at 05:25
  • Yes, we are considering all integers in $[A,A+B]$ that are coprime to $p$ (here $A,B$ are also not necessarily integers, just positive numbers). Would you like to write up an answer? – No One Jun 20 '21 at 17:52
  • I don't think Apostol's book covers sieve methods as the OP's identity resembles many equations in sieve theories. – TravorLZH Jun 23 '21 at 07:35
  • @TravorLZH Sure, but the answers show that it can be handled with basic manipulation of sums, making it well within the scope of Apostol’s book. – Erick Wong Jun 23 '21 at 21:04
  • @ErickWong yeah the derivation of Eratosthenes-Legendre sieve does not require knowledge outside of Apostol's textbook – TravorLZH Jun 24 '21 at 03:27

2 Answers2

2

The standard trick of writing the indicator function of $(p,q)=1$ as $e((p,q)) = \sum_{d\mid (p,q)} \mu(d)$ and then switching the order of summation works here, as already covered in this answer: https://math.stackexchange.com/a/3158036/30402

The error term is bounded by $d(q)$, which is well-known to be $O_\epsilon(q^\epsilon)$ for every $\epsilon>0$ (some references here). More precisely, it is bounded above by something of size $\exp((\ln 2 + o(1)) \log q / \log \log q)$. Not to say that this is the best possible error term, just the best one afforded by this method.

Erick Wong
  • 25,868
  • 3
  • 43
  • 96
  • In the first link above, I noticed $f(a,b) = a\sum_{d\mid b} \frac{\mu(d)}{d} + R = a\frac{\varphi(b)}b + R$. But why is $|R|$ bounded by the number of divisors of $b$? – No One Jun 21 '21 at 20:22
  • 1
    @NoOne The rounding error from replacing the floor by the exact quotient is at most $1$. The summation literally contains one term for each divisor of $b$, so the error add up to at most $d(b)$ in absolute value. – Erick Wong Jun 21 '21 at 20:24
  • 1
    This is much better than my answer. Now that I've written out the computation for myself, I don't see why my mind went straight to something so complicated as the fundamental lemma of sieve theory. – Joshua Stucky Jun 21 '21 at 20:42
1

This is essentially found in the Fundamental Lemma of Sieve Theory, which is a deep and interesting result. As its name suggests, it is quite important in the area of sieve theory. Granville and Soundarajan have some good notes on this, which you can find here. Their Theorem 1.4.2 (which can be found on page 37 of the notes I linked) is as follows. I've changed their notation to reflect the notation in your question.

Theorem (The Fundamental Lemma of Sieve Theory). Let $q$ be an integer with $(q,l)=1$, such that every prime factor of $q$ is $\leq (B/l)^{1/u}$ for some given $u = \frac{\log A}{\log B}\geq 1$. Then, uniformly [in the variables $A,B,q,l,a$], we have $$ \sum_{\substack{A \leq n \leq A+B\\ (n,q)=1 \\n\equiv a\ (\text{mod}\ l)}} 1 = \frac{B}{l} \frac{\phi(q)}{q}\left(1 + O(u^{-u/2}) \right) + O\left(\left(\frac{B}{l}\right)^{3/4+o(1)}\right). $$ Taking $a=l=1$, we get that $$ \sum_{\substack{A \leq n \leq A+B\\ (n,q)=1 }} 1 = \frac{B\phi(q)}{q}\left(1 + O(u^{-u/2}) \right) + O\left(B^{3/4+o(1)}\right). $$ The proof of the Fundamental Lemma is a bit too long to be written here. Whether or not this estimate constitutes and asymptotic or just and upper bound depends on how $B$ and $q$ grow with $A$.

It should be noted that the error term you have written is certainly false. In general, you should always expect your error term to depend on the length of your sum in some way. Except in very specific cases (such as the Polya-Vonogradov inequality), this is universally true of problems in analytic number theory.

  • Nice answer, but isn’t this particular case exactly analogous to Polya-Vinogradov? In the regime where $B$ is much larger than $q$, we do have the exact count for each subinterval of length $q$. So we could assume WLOG that $B < q$. A bound independent of $B$ is surely possible, the main question is how strong one can make it. – Erick Wong Jun 21 '21 at 13:45
  • See https://math.stackexchange.com/a/3158036/30402. This can be done more effectively with elementary methods. – Erick Wong Jun 21 '21 at 16:18