According to what I know about Fourier transforms, any continuous periodic signal can be represented as a combination of sine and cosine functions. To me, this looks analogous to the fundamental theorem of arithmetic (every integer $\ge 2$ can be represented as a unique product of primes) where the integer is the signal and the primes are the sine and cosine.

Any ideas of way to connect the Fourier transform with prime factorization?

P.S. I found this paper that does something close.

Rodrigo de Azevedo
  • 18,977
  • 5
  • 36
  • 95
  • 169
  • 1
  • 5
  • One of the references you linked to is a paper by Wolfgang Schramm. I made an entry in the OEIS about his type of GCD-Fourier calculation here: http://oeis.org/A231425 From it you also get the von Mangoldt function that encodes the fundamental theorem of arithmetic: http://oeis.org/A140256 http://oeis.org/A014963 – Mats Granvik Oct 21 '14 at 16:48

2 Answers2


The question is quite broad, but here is a possible relation between Fourier transformation and prime numbers.

We know that the Riemann zeta function is defined as $$\zeta(s) = \sum_{n=1}^\infty\frac{1}{n^s},$$ for all $\Re(s)>1$.

The second thing, that the Riemann zeta function is related to prime numbers via Euler product formula.

$$\zeta(s)=\sum_{n=1}^\infty\frac{1}{n^s} = \prod_{p \text{ prime}} \frac{1}{1-p^{-s}},$$

for all $\Re(s)>1$.

As a generalization of Riemann zeta function the Hurwith zeta function is defined as $$\zeta(s,q) = \sum_{n=0}^\infty \frac{1}{(q+n)^{s}},$$ for all $\Re(s)>1$ and $\Re(q)>0$. The Riemann zeta function is $\zeta(s,1)$.

Another way to generalize Riemann zeta function is using polylogarithm, which is defined as

$$\operatorname{Li}_s(z) = \sum_{k=1}^\infty {z^k \over k^s}.$$

For $\Re(s)>1$ we have $\operatorname{Li}_s(1)=\zeta(s)$. Is is also true, that $\operatorname{Li}_s(-1)= (2^{1-s}-1)\zeta(s)$.

The sequence of $N$ complex numbers $x_0,x_1,\dots,x_{N-1}$ is transformed with discrete Fourier transformation into an $N$-periodic sequence of complex numbers with

$$X_k\ =\ \sum_{n=0}^{N-1} x_n \cdot e^{-i 2 \pi k n / N}, \quad k\in\mathbb{Z}\,.$$

Of course by using Euler's formula we could also use trigonometric functions.

Here comes the connection. The discrete Fourier transform of the Hurwitz zeta function with respect to the order $s$ is the Legendre chi function, which is defined as $$\chi_s(z) = \sum_{k=0}^\infty \frac{z^{2k+1}}{(2k+1)^s}.$$ The Legendre chi function is related to polylogarithms as the following. $$\chi_s(z) = \frac{1}{2}\left[\operatorname{Li}_s (z) - \operatorname{Li}_s (-z)\right].$$

So it is also true that

$$\chi_s(1) = (1-2^{-s})\zeta(s),$$

for all $s>0$ real numbers.

So if we put this all together.

$$\prod_{p \text{ prime}} \frac{1}{1-p^{-s}} \stackrel{\text{DFT}}{\implies} (1-2^{-s})\prod_{p \text{ prime}} \frac{1}{1-p^{-s}},$$

for all $s>0$ real numbers.

I hope that my argument is right, it's just've come into my mind while reading your question. While doing the DFT at the end we've substituted $z=1$ into Legrende chi function.

  • 11,602
  • 3
  • 37
  • 101

It is not that logical to represent primes using Fourier transform directly. Fourier transform has linearity in mind and there is some linearity but not the one that can be easily exploited among primes.

At first, it looks like sieving, when you cross every second then every third then every fifth number and so on, is linear in nature, right? But this is just hiding a painful truth that $2 \cdot 3 = 6$ and that $2+3$ is not revealing anything regarding the composition of $5$.

If you start that every number can be represented uniquely as a product of primes


you obtain intended linearity using


Technically if you allow $\alpha_k=0$ you have


where $\alpha_k=0$ means that $p_k$ is not a factor of $n$, that $n$ is not divisible by $p_k$.

This, observing prime numbers using logarithmic scale, is bringing you to a cousin of Fourier transform, which is the Mellin transform. To illustrate it, we will use Gamma function, the extension of factorial, so if $f(x)=e^{-x}$ then its Mellin transform is the Gamma function

$$\Gamma(s) = \int_0^\infty e^{-x}x^{s-1} dx$$

We can define Fourier transform using Mellin transform, true, but you inevitably grab for logarithmic scaling in the process.

To understand why Mellin tastes better, we define Riemann zeta function as Mellin transform of another function $f(x)=\frac1{e^x-1}$ i.e.:

$$\zeta(s) = \frac1{\Gamma(s)}\int_0^\infty \frac1{e^x-1}x^{s-1} dx$$

To understand how intimate this function is to the primes, a few relations:

$$\ln\zeta(s) = s\int_0^\infty \frac{\pi(x)}{x(x^s-1)} dx$$

$$\frac{1}{\zeta(s)}=\sum_{n=1}^\infty \frac{\mu(n)}{n^s}$$

$$\zeta^2(s) =\sum_{n=1}^\infty \frac{d(n)}{n^s}$$

$$-\frac{\zeta'(s)}{\zeta(s)} = \sum_{n=1}^\infty \frac{\Lambda(n)}{n^s}$$

$$\frac{\zeta^2(s)}{\zeta(2s)} = \sum_{n=1}^\infty \frac{2^{\omega(n)}}{n^s}$$


$\pi(x)$ is number of primes up to $x$

$\mu(n)$ is Möbius function equal to $0$ if $n$ is divisible by square otherwise $1$ if it has even and $-1$ if it has odd number of prime factors

$d(n)$ is number of divisors of $n$

$\Lambda(n)$ is the von Mangoldt function equal to $\ln(p)$ if the number $n$ is $n=p^k$ otherwise $0$

$\omega(n)$ is the number of distinct prime factors of $n$

and many more relations like these.

Again, we are not far away from Fourier transform, we are just basically scaling it in order to extract multiplicative essence. Pure Fourier transform might connect two multiplicative relations related to primes, but to dig very deep into the primes we need related Mellin transform.

Regarding prime factorization, there is not much there where Fourier transform is directly involved. The problem is so complex that techniques are bordering with mathematical limits not rarely using guessing and heuristics even when the factorization is expect to run very fast and when the algorithm is quite precise and sound.

Still if you look back at the Riemann zeta function defined above as

$$\zeta(s)=\sum_{n=1}^{\infty} n^{-s} = \prod_{p \text{ is prime}}\frac1{1-p^{-s}}$$

you have readily available factorization of each $n$, albeit you cannot extract it directly. Because Riemann zeta function is intimately related to other arithmetic functions, all you need is to be able to extract $n^{th}$ coefficient of any interesting sum:


and that would be

$$\frac{a_n}{n^{\sigma}} = \lim_{T\to\infty} \frac{1}{2T} \int_{-T}^{T} f(\sigma+ it)n^{it} \mathrm{d}t$$

and you can obtain sufficient information about factorization to start the actual factorization. This is not the fastest possible known way, but it is the way that is relating Fourier, i.e. Mellin transform, with the factorization process more directly than with other known methods.

  • Could you please point me to a reference for the derivation/proof of the last formula $\frac{a_n}{n^{\sigma}} = \lim_{T\to\infty} \frac{1}{2T} \int_{-T}^{T} f(\sigma+ it)n^{it} \mathrm{d}t$ in your answer above? It seems to be somehow related to the inverse Mellin transform $\mathcal{M}_{-s}^{-1}[f(s)](x)=\frac{1}{2 \pi i}\int\limits_{\sigma -i \infty }^{\sigma +i \infty } f(s)\ x^s \, ds=\frac{1}{2 \pi }\int\limits_{-\infty }^{\infty } f(\sigma +i t)\ x^{\sigma +i t} \, dt$. – Steven Clark Sep 14 '21 at 18:12
  • 1
    11.11 An integral formula for the coefficients of a Dirichlet series, Theorem 11.17, Tom M. Apostol, Introduction to Analytic Number Theory – Alex Peter Sep 14 '21 at 19:40