1

How do you compute the asymptotic behavior, not sure if I'm wording this correctly, of $\sum_{j=1}^{n}(-1)^{j} \phi (j)$ where $\phi$ is the euler totient function, as in $\mathcal{O}(\sum_{j=1}^{n}(-1)^{j} \phi (j))= \mathcal{O}(?)$. I've looked at graphs of this sum for n up to 40000 and it's obviously decreasing with negative concavity but I don't really know what to do from there.

1 Answers1

3

Assuming that you are working with the alternating sum of the totient function, tweaking this calculation gives a good asymptotics. Indeed, using the formula $ \phi(n) = \sum_{md = n} m \mu(d)$ we can write

\begin{align*} \sum_{n \leq x} (-1)^n \phi(n) &= \sum_{md \leq x} (-1)^{md} m \phi(d) \\ &= \sum_{d \leq x} \phi(d) \sum_{m \leq x/d} (-1)^{md} m. \end{align*}

Now dividing the case according to whether $d$ is even or odd, we find that for any positive integer $k$,

$$ \sum_{m \leq k} (-1)^{md} m = \begin{cases} \frac{1}{2}k^2 + \mathcal{O}(k), & \text{if } d \text{ is even.} \\ \mathcal{O}(k), & \text{if } d \text{ is odd.} \end{cases} $$

Thus, by splitting the sum according to the parity of $d$ and using the fact that $\mu$ is non-zero only for square-free integers, we have

\begin{align*} \sum_{n \leq x} (-1)^n \phi(n) &= \sum_{\substack{ d \leq x \\ d \text{ : odd}}} \text{[to be typeset]} + \sum_{\substack{ d = 2d' \leq x \\ d' \text{ : odd}}} \text{[to be typeset]} \\ &= - \sum_{\substack{d' \leq x/2 \\ d' \text{ : odd}}} \mu(d') \frac{x^2}{2(2d')^2} + \mathcal{O}(x \log x) \\ &= - \frac{x^2}{8} \sum_{d' \text{ : odd}} \frac{\mu(d')}{(d')^2} + \mathcal{O}(x \log x) \\ &= - \frac{1}{6\zeta(2)}x^2 + \mathcal{O}(x \log x). \end{align*}

Calculation up to $x = 4000$ seems to suggest that the error term is $\mathcal{O}(x)$, but I have no idea how to push it down to this bound.

Sangchul Lee
  • 181,930