# Can the sum of two periodic functions with non-commensurate periods be a periodic function?

If the two functions are continuous this can't happen but what if one of them (or both) is discontinuous. I found an article but it's behind paywalls. I just need an example.

Let $A=\{p+q\sqrt{2}: p,q\in\mathbb{Q}\}$ and $B=\{p+q\sqrt{3}: p,q\in\mathbb{Q}\}$. The indicator of $A$, $\textbf{1}_A$, is periodic. Its periods are the elements of $A$. The same for $\textbf{1}_B$. These two functions have incommensurable periods, namely $\sqrt{2}$ and $\sqrt{3}$, but their sum $\textbf{1}_A+\textbf{1}_B$ is also periodic. So the sum of two periodic functions with non-commensurate periods can be a periodic function.

Can the sum of two periodic functions with non-commensurate fundamental periods be a periodic function?

• In the context of periodic functions with non-commensurable periods, it is assumed that the there is a fundamental period such that all periods are multiples of the fundamental period. Your examples do not have fundamental periods. Commented Aug 6, 2017 at 18:53
• @Somos I know that's why I'm asking if the sum of two periodic functions with non-commensurate fundamental periods can be a periodic function. I'm searching for an example. Commented Aug 7, 2017 at 10:33

It is possible. The example given in the linked paper takes three algebraically independent quantities $\alpha,\beta,\gamma$, and considers the functions $$f(x)=\begin{cases} 2^{|j|}+2^{|k|}, & x = i \alpha + j \beta + k\gamma \text{ for } i,j,k \in \Bbb{Z}\\ 0 & \text{otherwise} \end{cases}$$ and $$g(x)=\begin{cases} 2^{|i|}-2^{|k|}, & x = i \alpha + j \beta + k\gamma \text{ for } i,j,k \in \Bbb{Z}\\ 0 & \text{otherwise} \end{cases}$$
Then it's a fairly straightforward computation to show that $f$ has fundamental period $\alpha$, $g$ has fundamental period $\beta$, and $f+g$ has fundamental period $\gamma$.