EDIT: This is a major revision in light of sources provided by @ErickWong's comment.

The summatory Liouville function (OEIS sequence A002819) is $$L(n)=\sum_{1\le k\le n}(-1)^{\Omega(k)}\quad (n=1,2,3,\ldots)$$ where $\Omega(k)$ is the number of prime factors of $k$ counted with multiplicity. Thus $L(n)$ is the sum of the "parities" ($+1$ if even, $-1$ if odd) of the first $n$ values of $\Omega.$

Here is a plot of the first $10^9$ values of $L$, including overlays of some approximating curves:

enter image description here

The overlays are as follows:

  • A "central" curve (gray) ${\sqrt{n}\over\zeta({1\over 2})}$ whose functional form is suggested by Tanaka's 1980 proof (mentioned here and proved here) that $\ L(n)-{\sqrt{n}\over\zeta({1\over 2})}\ $ changes sign infinitely often as $n\to\infty.$

  • A "sinusoid" (red) which oscillates about the central curve with increasing "wavelength" and amplitude: $$\hat{L}(n) = {\sqrt{n}\over\zeta({1\over 2})}\left( 1 + \sqrt{1\over 2}\,\sin\left(t_1\ln(n) + 2.75\right) \right) $$ where $\zeta$ is the Riemann zeta function and $t_1$ is the imaginary part of the first nontrivial zero of $\zeta$. Thus $\zeta({1\over 2})=-0.684765236\ldots$ and $t_1=14.1347251\dots.$ The occurrence of $t_1$ in the argument of the sine function is suggested by the "summary description" of a Wikipedia plot here. I've adjusted the parameters of the sinusoid, including amplitude and phase, to obtain a visual fit.

Q1: The mentioned "summary description" cites this paper ("On Differences of Zeta Values"), which proves an asymptotically oscillatory behavior of the coefficients in a certain series representation of Riemann zeta. How does this lead to a zero of Riemann zeta appearing in $\hat{L}?$

Q2: Can it be shown that regular oscillatory behavior of $L(n)$ persists for arbitrarily large $n$?

NB: This behavior says nothing about how often $L(n)>0$ may occur (such as the "spike" in the plot at $n\approx 9\cdot 10^8$); i.e., it may be independent of whether $L$ changes sign infinitely often.

  • $\begingroup$ I do not know about your specific question, but you will find more references by searching for “Liouville lambda”. For instance, Wikipedia compiles some well-known results here en.m.wikipedia.org/wiki/Liouville_function $\endgroup$
    – Erick Wong
    Sep 30, 2019 at 3:01
  • 1
    $\begingroup$ @ErickWong - Thank you very much -- I hadn't known quite what to search for! $\endgroup$
    – r.e.s.
    Sep 30, 2019 at 6:19
  • 2
    $\begingroup$ Your "central" curve (gray) and "sinusoid" (red) are related to the explicit formula $L_o(x)=\frac{\sqrt{x}}{\zeta\left(\frac{1}{2}\right)}+\sum\limits_{k=1}^\infty\left(\frac{\zeta\left(2\,\rho_k\right)}{\rho_k\,\zeta'\left(\rho_k\right)}\,x^{\rho_k}+\frac{\zeta\left(2\,\rho_{-k}\right)}{\rho_{-k}\zeta'\left(\rho_{-k}\right)}\,x^{\rho_{-k}}\right)+I(x)$. $\endgroup$ Oct 2, 2019 at 23:29
  • $\begingroup$ Try plotting $f(x)=\frac{\sqrt{x}}{\zeta\left(\frac{1}{2}\right)}+\left(\frac{\zeta\left(2\,\rho_1\right)}{\rho_1\zeta'\left(\rho_1\right)}x^{\rho_1}+\frac{\zeta\left(2\,\rho_{-1}\right)}{\rho_{-1}\zeta'\left(\rho_{-1}\right)}x^{\rho_{-1}}\right)$ where $\rho_1=\frac{1}{2}+i\,14.1347$ and $\rho_{-1}=\frac{1}{2}-i\,14.1347$ is the first pair of non-trivial zeta zeros. $\endgroup$ Oct 2, 2019 at 23:29
  • $\begingroup$ $L_o(x)$ above is the explicit formula for $L(x)=\sum\limits_{n\le x}\lambda(n)$ where $\lambda(n)=(-1)^{\Omega(n)}$. $\endgroup$ Oct 2, 2019 at 23:39

2 Answers 2


The summatory Liouville function is defined as follows where $\Omega(n)$ is the number of prime factors of n counted with multiplicity.

(1) $\quad L(x)=\sum\limits_{n\le x}\lambda(n)\,,\qquad\lambda(n)=(-1)^{\Omega(n)}$

The OP's "central" curve (gray) and "sinusoid" (red) are related to the explicit formula for $L(x)$ illustrated in formula (2) below (see THE EXPLICIT FORMULA FOR $L_o(x)$ By A. Y. FAWAZ).

(2) $\quad L_o(x)=\frac{\sqrt{x}}{\zeta\left(\frac{1}{2}\right)}+\sum\limits_{k=1}^\infty\left(\frac{\zeta\left(2\,\rho_k\right)}{\rho_k\,\zeta'\left(\rho_k\right)}\,x^{\rho_k}+\frac{\zeta\left(2\,\rho_{-k}\right)}{\rho_{-k}\zeta'\left(\rho_{-k}\right)}\,x^{\rho_{-k}}\right)+I(x)\,,\quad x>0$

Consider the function $f(x)$ defined below which represents the primary growth term plus the contribution of the first non-trivial zeta zero pair $\rho_1=\frac{1}{2}+i\,14.1347$ and $\rho_{-1}=\frac{1}{2}-i\,14.1347$.

(3) $\quad f(x)=\frac{\sqrt{x}}{\zeta\left(\frac{1}{2}\right)}+\left(\frac{\zeta\left(2\,\rho_1\right)}{\rho_1\zeta'\left(\rho_1\right)}x^{\rho_1}+\frac{\zeta\left(2\,\rho_{-1}\right)}{\rho_{-1}\zeta'\left(\rho_{-1}\right)}x^{\rho_{-1}}\right)$

Figure (1) below illustrates $L(x)$ in blue, the primary growth term $\frac{\sqrt{x}}{\zeta\left(\frac{1}{2}\right)}$ in gray, and $f(x)$ in red.

Illustration of L(x) (blue), primary growth term (gray), and f(x) (red)

Figure (1): Illustration of $L(x)$ (blue), $\frac{\sqrt{x}}{\zeta\left(\frac{1}{2}\right)}$ (gray), and $f(x)$ (red)

Assuming the Riemann Hypothesis (RH):

  • $\rho_k=\frac{1}{2}+i\,\Im(\rho_k)$,
  • $\rho_{-k}=\frac{1}{2}-i\,\Im(\rho_k)$,
  • $x^{\rho_k}=\sqrt{x}\left(\cos\left(\Im\left(\rho_k\right)\log x\right)+i\,\sin\left(\Im\left(\rho_k\right)\log x\right)\right)$, and
  • $x^{\rho_{-k}}=\sqrt{x}\left(\cos\left(\Im\left(\rho_k\right)\log x\right)-i\,\sin\left(\Im\left(\rho_k\right)\log x\right)\right)$.

This can be combined with $\frac{\zeta\left(2\,\rho_{-k}\right)}{\rho_{-k}\zeta'\left(\rho_{-k}\right)}=\left(\frac{\zeta\left(2\,\rho_k\right)}{\rho_k\zeta'\left(\rho_k\right)}\right){}^*$ (where $*$ indicates the complex conjugate) to derive the following result which is strictly real.

(4) $\quad\frac{\zeta\left(2\,\rho_k\right)}{\rho_k\,\zeta'\left(\rho_k\right)}\,x^{\rho_k}+\frac{\zeta\left(2\,\rho_{-k}\right)}{\rho_{-k}\,\zeta'\left(\rho_{-k}\right)}\,x^{\rho_{-k}}=\\$ $\qquad 2\sqrt{x}\left(\Re\left(\frac{\zeta\left(2\,\rho_k\right)}{\rho_k\,\zeta'\left(\rho_k\right)}\right)\cos\left(\Im\left(\rho_k\right)\log x\right)-\Im\left(\frac{\zeta\left(2\,\rho_k\right)}{\rho_k\,\zeta'\left(\rho_k\right)}\right)\sin\left(\Im\left(\rho_k\right)\log x\right)\right)\quad\text{(Assuming RH)}$

In mathematics the natural logarithm of $x$ is commonly referred to as $\log(x)$ instead of $\ln(x)$, and $\log_b(x)$ refers to the base $b$ logarithm of $x$. This is consistent with the notation generated by Mathematica when formulas are copied as Latex. Also, $\rho_k$ is returned by the Mathematica function $ZetaZero[k]$.

  • $\begingroup$ The error term in Fawaz's formula is known to be O(1/sqrt(x)). If you bound the absolute value of imaginary parts of the zeros of the zeta function by T in Fawaz's formula, then you get a formula with an error term that depends on x and T. Would you happen to know a formula for the error term depending on x and T? $\endgroup$
    – EGME
    Oct 18, 2022 at 8:50
  • $\begingroup$ @EGME Sorry, I'm not aware of such a formula, but I haven't purchased the full version of the paper by Fawaz for review. Apparently it does not address such a formula? For the function $M(x)=\sum\limits_{n=1}^x \mu(n)$, section 14.27 of Titchmarsh gives the formula $M(x)=\frac{1}{2\pi i}\int\limits_{2-i T}^{2+i T}\frac{x^s}{s}\frac{1}{\zeta(s)} ds+O\left(\frac{1}{T}\right)$ for a fixed non-integer $x$. $\endgroup$ Oct 18, 2022 at 16:35
  • $\begingroup$ Thank you. Perhaps I will try to work it out. $\endgroup$
    – EGME
    Oct 19, 2022 at 17:23
  • $\begingroup$ @EGME For the function $\psi(x)=\sum\limits_{n=1}^x \Lambda(n)$, Theorem 12.1 of section 12.2 of Ivic's "The Riemann Zeta-Function" indicates $\psi(x)=x-\sum\limits_{|\Im(\rho)|\le T} \frac{x^{\rho}}{\rho}+O\left(x T^{-1} (\log(x T)^2)\right)+O(\log(x))$ which is I believe is more analogous to your desired formula. Theorem 12.5 of Montgomery and Vaughan gives a slightly different formula. $\endgroup$ Oct 19, 2022 at 19:01
  • $\begingroup$ @EGME There are also some formulas at en.wikipedia.org/wiki/Liouville_function#Generalizations that might be of interest. $\endgroup$ Oct 20, 2022 at 1:47

All the explicit formulas come from the inverse Mellin transform + residue theorem $$\frac{\zeta(2s)}{\zeta(s)}=s\int_1^\infty (\sum_{n\le x}(-1)^{\Omega(n)})x^{-s-1}dx$$ $$\sum_{n\le x}(-1)^{\Omega(n)} = \frac{1}{2i\pi} \int_{2-i\infty}^{2+i\infty} \frac{\zeta(2s)}{\zeta(s)} \frac{x^s}{s} ds=\sum Res(\frac{\zeta(2s)}{\zeta(s)} \frac{x^s}{s})$$ except that the convergence of that sum over the residues (over the trivial and non-trivial zeros) is quite unclear, thus either we add a regulator (looking at $\int_1^x \sum_{n\le y}(-1)^{\Omega(n)}dy$), or we approximate the integral by $ \int_{2-iT}^{2+iT}$ for well chosen value of $T$ such that we can "traverse the critical strip" to express it as a sum over the first few non-trivial zeros.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .