On the Relation Between Fourier Frequency and Period for Discrete Signals, and Series of Discrete Periodic Complex Exponentials

Discrete complex exponentials are almost periodic signals, not always periodic; when periodic, the frequency determines the period, but not viceversa, the period being a chaotic function of the frequency, expressible in terms of <italic>Thomae's function</italic>. The absolute value of the frequency is an increasing function of the subadditive functional of <italic>average variation</italic>. For discrete signals that are either sums or series of periodic complex exponentials, the decomposition into their periodic, additive components allows for their <italic>filtering according to period</italic>. Likewise, their <italic>period-frequency spectrum</italic> makes predictable the effects on period of convolution filtering. Ramanujan-Fourier series are a particular case of the signal class of <italic>series of periodic complex exponentials</italic>, a broad class of signals on which a transform, discrete both in time and in frequency, called the <italic>DFDT Transform</italic>, is defined.


I. INTRODUCTION
Discrete complex exponentials behave differently from continuous complex exponentials in that the relationship between period and Fourier frequency is not as straightforward as it is for continuous complex exponentials: |ω|T = 2π , where T stands for the period, and ω for the frequency. Discrete complex exponentials e jnθ are uniformly almost periodic [13]- [16], but not always periodic. When periodic, the period is a positive integer N; remarkably, |θ | does not uniquely determine N, and N depends univocally on θ in a chaotic way, closely related to Thomae's function; see Section III-B. The relation between period and frequency for discrete complex exponentials is made explicit with the period-frequency matrix, defined in Section IV-C. The frequency is well related to the average variation of the complex exponential, as in Fig. 2 of Section I-B.
Ramanujan sums have been considered for application in Signal Processing, e.g. in [11] and [22]. In particular, they have been used to study the periodicity structure of streaming data [10], and also how the periodicity of a sampled continuous signal does not imply the periodicity of the continuous signal [9]. We are interested in periodicity, as it results from the addition of periodic signals (see Section V). Also, in Section VII, we consider the relation between the periodicity of a sampled continuous complex exponential and the period of the resulting discrete complex exponential. The integrality of Ramanujan sums is usually proved using Möbius inversion; we include a deduction that uses the pin train signal in Section III-C. The usefulness of Möbius inversion in the computation of Fourier transforms has been considered e.g in [12] and in [21]. Ramanujan Sine Sums, also integer valued, have not been considered as much in Signal Processing; we briefly review them in Section III-D. Series of Ramanujan sums have been considered in Number Theory but not so much in Signal Processing; more generally, we claim that series of periodic complex exponentials are an important source of signals for Signal Processing. It seems to us that discrete almost periodic signals are underrepresented in Signal Processing; exceptions being [8], [7] and [5]; we stress the almost periodicity of complex exponentials of frequencies that are not rational multiples of 2π . Series of discrete periodic complex exponentials are also a source of almost periodic discrete signals. The functional of average variation, which measures the roughness of a signal, is not used often in Signal Processing, although the related Total Variation functional [6] is commonly used in Image Processing since 1994; we find that the average variation (defined in Section I-B) usefully and intuitively discriminates among the discrete complex exponentials of a given period, and also that its application to Ramanujan Sums, in Section III-E, is insightful.
A few remarks on terminology: a continuous function is continuous in the sense of calculus, while a continuous-time, continuous or analog signal is a function whose domain is a continuum, e.g. an interval of the real line. A discrete signal is a function whose domain is a countable set, e.g. the integers or the rationals. Being the variables of the discrete-time and continuous-time Fourier transforms, we call Fourier frequencies the angular frequencies θ and ω of the discrete complex exponentials e jnθ , n ∈ Z, and the continuous complex exponentials e jtω , t ∈ R. 1 From this point onwards, unless otherwise specified, whenever the terms signal or complex exponential are used, the discrete case will be understood.
Section II characterizes the space of the Fourier frequencies as a circle, and classifies the periodicity of complex exponentials into periodic and almost periodic. Fourier frequency looses its intuitive meaning in the discrete case, and the functional of average variation (Section I-B) supplies some of the lost intuition by assigning a degree of smoothness to each complex exponential; thus, for each period, we give the frequencies of the smoothest and the roughest complex exponentials. We review the definition of almost periodicity for discrete signals (sequences). The separate concepts dealt with in Section II are not novel but the approach as a whole is. We think there is a tendency to extrapolate from the continuous to the discrete case that does not always hold good.
Section III reviews a few relevant concepts from Number Theory, including both Ramanujan cosine and sine sums. We study the average variation of Ramanujan (cosine) sums and we show the role of Thomae's function relating period and Fourier frequency. Also, since for the computation of series of periodic complex exponentials (considered in Sections IV and VI) you use series over the rational numbers, we give the ordering (called Farey ordering) in which such series are to be summed up. Sections III-A, III-B and III-E present contributions of the paper, novel to Signal Processing, notwithstanding the probable fact that mathematicians may have considered them previously.
Under the proviso that, for signals in practice that are either periodic or series of periodic signals, each additive component of a given period comes from a different source, the decomposition of such signals into sums of signals of different periods becomes an important tool. Section IV introduces the concepts of the period-frequency matrix, the Discrete-Frequency, Discrete-Time Transform, and the notion of filtering periodic signals according to period, rather than frequency. These are tools that deal with signals in the combined domain of period and frequency. The consideration of the period-frequency support of periodic signals leads to the consideration in Section IV-D of signals that are (infinite) series of periodic complex exponentials (see also Section VI), which are signals that are not necessarily Ramanujan-Fourier Series (see Section III-F), opening the way to the consideration of nonperiodic signals without a DTFT. These signals are "bigger" than signals with a DTFT, and we define a norm for them in Section VI.
Section V introduces the notions of strong and weak periodicity; a signal of period N is said to be weakly periodic if it can be expressed as a sum of signals of periods strictly less than N. Otherwise, it is said to be strongly periodic. Sawtooth signals are shown to be strongly periodic. Also, the periodicity of sums of periodic signals is characterized on the basis of Fourier frequency. We consider particularly the case when the period of a sum of periodic signals is less than the least common multiple of the periods of the summands, a topic treated in [25] somewhat differently.
The use of Ramanujan sums in the Discrete Fourier Transform has proven useful in Signal Processing, see e.g. [21]. Likewise, the use of series of Ramanujan sums; see e.g. [1]. In a sense, an inverse Ramanujan Fourier transform expresses a signal as a series combination of weighted Ramanujan sums. We generalize this idea by allowing the possibility of assigning a different weight to each periodic complex exponential in a series of all the periodic complex exponentials. This allows for example the possibility of separate series of the smooth and rough periodic complex exponentials. Thus, Section VI formally defines the discrete-frequency, discrete-time transform DFDT, introduced in Section IV, by characterizing certain spaces of signals on which Carmichael's inner product can be defined, used in turn for the computation of the DFDT transform.
Applications to continuous-time signals are given in Section VII.
The paper is written in a lemma-proof style and several examples are given.

A. INITIAL REMARKS ON PERIODICITY
To use the term period in an unambiguous sense, we define a repetition time of a signal s : Z → C to be any integer k such that ∀n ∈ Z, s n+k = s n . Thus, the signal is periodic if it has a positive repetition time, and its period is given by the minimal positive repetition time. If the period is N, the signal is said to be N-periodic. Lemmas 1-3 make rigorous certain results using this terminology.
Lemma 1: If L is a repetition time of the N-periodic signal s, then L is a multiple of N: N|L.
Proof: By the division algorithm, there are numbers c and r, 0 ≤ r < N, such that L = cN + r. If N L then r > 0 but then ∀n s n = s n+L = s cN+r = s n+r gives a contradiction. For each frequency θ ∈ [0, 2π ), the complex exponential e jθn is periodic if and only if its frequency θ is a rational multiple 2π q of 2π , otherwise it is only almost periodic. In the first case, for θ = 2π M N , with M and N relatively prime, the period is N. Thus, for each N ∈ Z + , there are precisely ϕ(N ) complex exponentials of period N, where ϕ stands for Euler's totient function; see Section III.
A signal is periodic if and only if it is a linear combination of periodic complex exponentials, i.e. if its spectrum support is finite and consists of frequencies of the form 2π q, q ∈Q := Q ∩ [0, 1). The period of a periodic signal is the least common multiple of the periods of the complex exponentials it is a linear combination of, as shown in Lemma 9 of Section V.
Almost periodicity for discrete signals is defined in Section II-C. Almost periodicity was initially defined [13], [15], [14] for functions of a continuous argument and soon afterwards [17], [16] for sequences. Periodicity is a structural property of signals which, since the times of Euler, the Bernoulli's and Fourier, has the trigonometric-series aspect as well; likewise, almost periodicity has both aspects [15]. The structural aspect is intuitive and the trigonometrical-series provides a tool to handle the signals.
A linear combination of complex exponentials, as well as a series of complex exponentials, such as a Ramanujan-Fourier series, can be non-periodic, almost periodic. The consideration of almost periodic inputs to linear systems [18] is of interest, theoretical and practical [16], and a discrete, autonomous nonlinear system can generate almost periodic signals.
For an N-periodic signal s, the average variation is given by the average variation over one period: Average variation is a measure of roughness; defining the smoothness of a complex exponential as two minus its average variation, the roughness is high for frequencies θ with |θ | ≈ π , while for |θ | ≈ 0 = 2π (i.e. equivalent as frequencies, on the basis of Equation (3), below) the smoothness is high. Complex exponentials of the same period but of different Fourier frequencies have different average variations.

C. SERIES OF PERIODIC COMPLEX EXPONENTIALS
Of recent interest in Signal Processing are both Ramanujan Sums (which are periodic) and Ramanujan-Fourier Series [27], [22], [26]. The complex exponentials of a given period in a Ramanujan-Fourier series are given the same weight; we generalize this by considering series of periodic complex exponentials where each periodic complex exponential in a series of periodic complex exponentials may have a different weight, in what we have termed the DFDT; see Sections IV-D and VI. For a convergent series of periodic complex exponentials, the pairing of the sequence of the coefficients of the series, and the resulting signal, is a pairing of signals that are discrete both in the time and in the frequency domains.
The countable, dense set {2π q : q ∈ [0, 1) ∩ Q} gives the set of the frequencies of the periodic complex exponentials. For the spectral analysis and filter design of series of periodic complex exponentials, we group the Fourier frequencies according to period, on the period-frequency matrix, as explained in Section IV.

II. COMPLEX EXPONENTIALS
Denote as the set [0, 2π ) of the Fourier frequencies. The similarity of two Fourier frequencies θ 1 and θ 2 is inherited from the similarity of the corresponding complex exponentials {e jθ 1 n } and {e jθ 2 n }, by using the metric d (θ 1 , θ 2 ) := sup{|e jθ 1 n − e jθ 2 n | : n ∈ Z}, on the set of the Fourier frequencies. With this metric, the space of the Fourier frequencies is a topological circle, and it is cyclically ordered [30]. Other subsets of R can be used as Fourier-frequency sets; namely, any interval of length 2π , half closed, half open, such as [0, 2π ) or (−π, π]; the second case allows for the consideration of both positive and negative frequencies. The endpoints of any interval of length 2π are equivalent: as θ → 2π , e jθn → e j0n since, for each > 0 there is a δ > 0 such that ∀n ∈ Z, |e jδn − e j(2π−δ)n | = 2| sin(δn)| < .

A. PERIODICITY OF COMPLEX EXPONENTIALS
The signal e jn is not periodic, it is only almost periodic; in fact, a complex exponential e jθn is periodic if and only if its frequency θ is a rational multiple of 2π : Lemma 2: The complex exponential e jnθ is periodic if and only if θ is a rational multiple of 2π .
Proof: Clearly, the condition is sufficient. Also, if e jθn is periodic, there is a positive integer r such that e jθ (n+r) = e jθn e jθr = e jθn ; then, since an exponential never takes the value 0, e jθr = 1. Then, for some integer k, θ r = 2π k and the condition is necessary as well.
Lemma 3: The period of e j2π M N n , with M < N and M and N relatively prime, is N. Proof: Clearly, N is a repetition time of e j2π M N n . Let gcd(N, M ) = 1 and assume that there is another positive repetition time N less than N; then, for some integer k, M N N = k, but then, being M N equal to k N , it is reducible, which is a contradiction.
The closer to 0 the frequency of a complex exponential is, the smaller its variation is, and the closer to π the frequency is, the larger the variation. For N > 2, among the ϕ(N ) complex exponentials of period N, two are smoothest (see Lemma 4), and two are roughest (see Lemma 5). For small values of N, i.e. for N = 2, 3, 4 and 6, they coincide; see Fig. 11, below. We present the formulae for the frequencies of the smoothest and roughest complex exponentials of given period, in the following two lemmas and corollary.
Lemma 4: The smoothest complex exponentials of period N are those of frequencies 2π 1 N and 2π N−1 N . Proof: The lemma follows from the fact that 1 and N, as well as N − 1 and N are relatively prime for all N, and from the variation of complex exponentials, visualized in Fig. 2.

C. NON-PERIODIC COMPLEX EXPONENTIALS
We denote the integer interval {n ∈ Z : M ≤ n ≤ N} as /M, N/. It follows from Lemma 2 that, for the frequencies that are non-rational multiples of 2π , e jθn is not a periodic signal. A discrete signal {s n } is said to be almost periodic [17], [16], if for each real positive there is a length L ∈ Z + such that each integer interval /k, k + L/, k ∈ Z, of length L, contains a number R such that ∀n ∈ Z |s n − s n+R | < .
The following two lemmas give known results whose proofs are not easy to find in the Signal Processing literature.

Lemma 6:
Each complex exponential e jθn is almost periodic.
Complex exponentials meet a condition stronger than almost periodicity: Lemma 7: For each > 0 there is a positive integer R such that ∀n ∈ Z |e jθn − e jθ (n+R) | < .
Proof: If the exponential is N-periodic, take R = N. Otherwise, if e jθn is not periodic, then for a given there is a positive integer R such that 1 − e jθR < , since, as proven by H. Weyl [31], the sequence {(nx)}, for 2 irrational x, is uniformly distributed in [0, 1); correspondingly, for θ not a rational multiple of 2π , the sequence {nθ }, mod-2π , is uniformly distributed in [0, 2π ), and the lemma follows.

III. RAMANUJAN SUMS AND SOME NUMBER THEORY
Let the (unique) prime factorization of the positive integer N into (distinct) prime numbers be where α i ≥ 1, for each i ∈ /1, R/; we refer to the numbers p α i i as the largest-power-of-a-prime factors (abbreviated as lpp factor) of N. Euclid's algorithm of division says that, for any integers N and M, with M > 0, there are integers c and r, with 0 ≤ r < M, such that N = cM + r. If r = 0, one says that M divides N and write M|N; otherwise, write M N. The number , and the sum of the divisors σ (N ) of N is σ (N ) = a|N a. ϕ(N ) denotes the number of relatively prime numbers to N, not larger than N; it is known as Euler's totient function.
The following result is well known but seldom made explicit. Lemma Proof: We prove the contrapositive. If N and N − M are not relatively prime, there is a prime p that divides both N − M and N, then ∃r, s, N − M = r p and N = sp, then M = p(s − r) and p divides M; then N and M are not relatively prime. 2 Here, (nx) denotes the decimal part of nx. Incidentally, Walther's [17] interest in almost periodic sequences stemmed from Hecke's study of the analytic continuation of the series ∞ n=1 (nx)z n , |z| < 1, with x irrational.
Alternatively to the notation of Equation (4), letting {p i } be the ascending count (i.e. a one-to-one correspondence with the natural numbers) of (all) the prime numbers, given numbers m and n, you may write where only a finite number of the α i 's, and of the β i 's, are positive. The least common multiple and the greatest common divisor of m and n are then given by lcm(m, ; note that each lpp factor of lcm(m, n) is an lpp factor of at least one m and n. Also, lcm(m, n)gcd(m, n) = mn. The max and the min operators being associative, if A and B are sets, then lcm(A ∪ B) = lcm(lcm(A), lcm(B)) and gcd(A ∪ B) = gcd(gcd(A), gcd(B)).

A. FAREY SEQUENCES AND SERIES OVERQ
The Farey sequences induce an order for series that are summed over the rationals 3 in [0, 1). The Farey sequence [29] F n of order n is the ascending (finite) sequence of the irreducible fractions between 0 and 1 whose denominators do not exceed n. Thus, for example, F 6 = { 0 the dictionary order, with denominators in ascending order, and the numerators in ascending order.
The ordering of the terms of a series matters and the order in which the terms are to be summed must be specified. 4 For a function f :Q → C, e.g. f (q) = c q e j2πqn , we assume the Farey ordering of the terms in the series q∈Q f (q):

B. THOMAE'S FUNCTION AND THE RELATION PERIOD-FREQUENCY
Let η(q), q ∈Q − {0}, give the denominator of the irreducible fraction equivalent to q; thus, for m n any fraction equivalent to q, Call η the denominator function, and extend it, with η(0) = 1.
Restricted toQ, Thomae's function is given by Let Tomae's signal t : N →Q be given by t 0 = 0 and Let the function N :ˆ → Z + be given by N (θ ) = η( θ 2π ); it gives the period of the periodic exponential e jθn . It is a chaotic function: a change of θ , no matter how small, is likely to produce a large change of N; in fact, any positive-length interval (θ 0 , θ 0 + ) contains frequencies of complex exponentials of arbitrarily large periods. Also, for any period n, and any positive-length interval (θ 0 , θ 0 + ) ⊂ [0, 2π ), the corresponding complex exponentials of period less than n are finite in number, possibly zero, while the set of corresponding complex exponentials of period larger than N is infinite. See Fig. 10, below.

C. RAMANUJAN (COSINE) SUMS
We briefly review the definition of Ramanujan sums, in order to set the notation. For each positive integer N, the Ramanujan sum [20] of order N is the function c N : Z + → C given by is precisely the sum of the complex exponentials of period N and is therefore N-periodic (see Section II.) Each Ramanujan sum c N (n) is an even function 3 No count c : N → Q preserves the standard (inherited from the reals), linear order of Q. 4 The order is immaterial when the series is absolutely summable. 5 Actually, Z * (N ) is the multiplicative group [28] whose elements are the elements of the additive group Z(N ) = {0, 1, . . . N − 1} that are relatively prime to N.  with respect to n = N 2 , that is Ramanujan sums are integer valued; in fact, you can write the discrete comb signal 6 as and, using Möbius inversion formula [29], Ramanujan concludes that where μ denotes the Möbius function; see

D. RAMANUJAN SINE SUMS
Ramanujan also introduced [20] the sine sums For even N, the coprime k's are odd; then, j k−1 in Equation (11) is real, and so is s N (n). For N of the form 4m + 2, m ∈ N, s 4m+2 = 0(n) is the zero signal since, then, is integer-valued for n ∈ Z, since we know that for even N, s 4 m (n) is real and, in addition, |(j −k − j k )j

E. AVERAGE VARIATION OF RAMANUJAN SUMS
We present a few results regarding the average variation of Ramanujan sums, together with their deductions. Being a sum of zero-average signals, for N > 1, the average of each Ramanujan sum c N is zero; or, from Equation (10), see [29], and the linearity of the average operator, A computation of the average variations of the first 10 Ramanujan sums gives 0, 4/2, 6/3, 8/4, 10/5, 8/6, 14/7, 16/8, 24/9 and 24/10. As a function of N, var(c N (n)) is a chaotic function, yet, it has some patterns that we explain below; see Fig. 7 and Table 1. From Equation (10), with N as in equation The average variation of c 1 is zero. For p prime, and thus var(c p ) = 2p p = 2. We say that a signal {s n } is sparse whenever every non-zero term is surrounded by zero terms, i.e. ∀n, s n s n−1 = 0. The interpolation operator [23] is useful for the computation of the average variation Ramanujan sums. The degree-L interpolation operator ϒ L , L ∈ Z + , when applied to a signal x, produces the signal whenever n L ∈ Z, and y n = 0 otherwise. The interpolation operator preserves the average of the signal and, as we show below, in some cases, the average variation of the signal as well. Also, for L > 1, the interpolated version of a signal is always sparse. Lastly, note that the average variation of a sparse signal and of an interpolated version is the same.
If the prime p divides N then, p 2 |pN, μ(p 2 ) = 0 and thus, for example, If a Ramanujan sum is so interpolated twice, the second time, its average variation does not change. In particular, for N = 2 α , the average variation is 2, since Similarly, for N = p α a power of the prime p, for example, the number 3 being prime, c 3 (n) has average variation 2; the average variation of c 3 2 (n) is 8 3 ; therefore, for α ≥ 2, the average variation of c 3 α (n) is 8 3 ; see Table 1. More generally, with p 1 < . . . < p R a fixed collection of primes, for all N's of the form N = p α 1 1 . . .p α R R , with α i ≥ 1, and at least one α i ≥ 2, the average variation of the corresponding Ramanujan sums c N (n) is the same; the reasons being that firstly, the original sum was "sparse" and secondly, that when you multiply one such N times Table 1.

F. SERIES OF RAMANUJAN SUMS
Equations (6.1) and (7.2) of Ramanujan's paper [20] n z is Riemann's zeta function, and σ s (n) is the sum d|n d s of the s th power of the divisors of n. 7 Thus, for s = 1, he deduces that, for n ≥ 1, the signal in this equation is a series of periodic complex exponentials that is neither almost periodic nor bounded. 8 For each N prime, | 1 N c N (n)| periodically takes values arbitrarily close to 1; still, since is the zero signal Z + → C; see Fig. 8 for a truncated version of the series, where it is apparent that the convergence is not uniform. As a number theorist, Ramanujan considered the sums c N (n) for n ∈ Z + ; notice that, for n = 0, you have 7 It is not hard to show that σ −s (n) = σs (n) n s . 8 ρ(n) = σ (n) n is known as the relative sum-of-divisors function. The Riemann Hypothesis is equivalent to σ (n) n < e γ log log(n), for n > 5040 [35]. where δ is Kronecker's delta sequence.
Ramanujan sums can be extended in several ways; for example, in Equation (8), you might allow for n ∈ N, or n ∈ Z; if n ∈ R then you get a continuous signal [27]; n ∈ C, if you are interested in analytic functions of the complex variable.

IV. PERIOD-FREQUENCY SPECTRUM AND FILTERING
With the exception of Subsection IV-D and IV-E, this Section, as well as the following one, deal with periodic signals. Section VI deals with (infinite) series of periodic signals. We introduce the notion of the (unique) representation of an N-periodic signal as the superposition of its d-periodic components (d|N); if the N-periodic component is not null, we say that the signal is strongly periodic, otherwise it is said to be weakly periodic. The decomposition according to period allows for the filtering of the signal according to period; these notions are extended to the case of signals that are series of periodic signals. Under the assumption that the each d-periodic component of an N-periodic signal arises from a different source, the filtering according to period of the signal can either enhance or deplete the contribution of each source. A period-frequency matrix allows for the explicit representation of periodic signals, as well as series of periodic signals, in the period-frequency domain.
If s is N-periodic and X = DFT[s 0 , . . .
uniquely expresses s as a linear combination of complex exponentials, of Fourier frequencies 2π N k. With X N := X 0 , it can be reorganized as This decomposition into signals of period d, d|N, is unique, except for the order of the terms. The average of s is X N = X 0 . For the remaining divisors d of N, the average power associated with the d-periodic component is

A. FILTERING PERIODIC SIGNALS ACCORDING TO PERIOD
of signal s is multiplied times a given factor α d , you get the filtered-by-period signal X rd e j2π r d n , as in Fig. 9.

B. PERIOD SUPPORT OF A PERIODIC SIGNAL
Writing a periodic signal s as its average power is given by Let the period support of the signal be the set of the periods of the complex exponentials a periodic signal is a linear combination of. For the signal in Equation (19), you have (see Equation (23)) and, for the signal in Equation (26), where η is the denominator function, of Equation (7). As shown in Lemma 9 below, the period of a periodic signal is the least common multiple of its period support, i.e. lcm( ).

C. PERIOD-FREQUENCY SUPPORT OF A SERIES OF PERIODIC SIGNALS
Consider series of periodic signals of the form where the order of the terms in the series is the Farey order of Equation (6), and F * k := F k − {1}. The spectrum of signals that are either sums or series of periodic complex exponentials can be organized on the basis of a period-frequency matrix, so that the frequencies and periods of the periodic complex exponentials that compose a signal are organized in an explicit way. Let the period-frequency matrix be given by the set The period-frequency matrix is a subset of the Cartesian product Z + ×ˆ , as shown in Fig. 10. The period-frequency matrix is the 90 • -rotated graph of the inverse of the Qrestricted Thomae's function τ of Fig. 3. It is an infinite version of the Farey array considered in [24]. For each component b q e j2πqn of a periodic signal, or a series of periodic signals, if the limit exchange of Equation (32) below is valid, there corresponds the average power |b q | 2 and the point (η(q), 2π q) of the period-frequency matrix. The distribution of the average power in the combined domain of period and Fourier frequency is useful information; notice how any convolution filter with transfer function H (θ ) which is nonzero over an interval, will let pass complex exponentials of arbitrarily large periods. With a low-pass filter you may block out exponentials of small periods; with a sharp cutoff frequency θ c , you block out periods smaller than or equal to 2πθ is valid, in which case, the average power is given by lim k→∞ q r ∈F * k |b q r | 2 . This is made more precise with Carmichael's inner product, in Section VI-C.
Let the period-frequency spectrum of signals of the form in Equation (30) (with either finite or infinite non-null terms or not) be defined on the period-frequency matrix, and be given by (N, θ ) := (η(q), 2π q) = |b q | 2 .
Correspondingly, let the period-frequency spectrum support be given by it is a subset of the period-frequency matrix. The periodfrequency spectrum support of each Ramanujan sum c N (n) is precisely the column of abscissa N of the period-frequency matrix.
The DFDT is asymmetric in the sense that, in the time domain, you have two-sided signals {s n : n ∈ Z} while, in the frequency domain, you have one-sided signals {b k : k ∈ N}, unless you consider negative frequencies and the rationals in (− 1 2 , 1 2 ] instead ofQ, and their corresponding order- 1 5 . . .}, resulting from the Farey ordering, and with q = −(1 − q), whenever q ∈ ( 1 2 , 1).

E. FILTERING BY PERIOD SERIES OF PERIODIC COMPLEX EXPONENTIALS
Equation (20) expresses a periodic signal in terms of its dperiodic components, d|N. In the limit, as N → ∞, you get that the signals of Equations (30) and (33) and, given a sequence {α d : d ∈ Z + } of coefficients, you get the filtered-by-period signal provided there is convergence. Thus, for example, with α d = d, the filtering of a signal of the form in Equation (16), with s > 1, gives the signal σ s−1 (n) n s−1 ζ (s) .

V. PERIOD OF SUMS OF PERIODIC SIGNALS
The period of a sum of periodic signals may be smaller than the least common multiple of the periods of the summands (it can be as small as the least common multiple divided by the greatest common divisor), when they are weakly periodic. The sawtooth signals, as well as the pulse trains, are shown to be strongly periodic.
If the frequencies in of the spectrum support of a periodic signal are known with full accuracy, the period can be computed, as the following lemma indicates.
Lemma 9: The linear combination , periodic, complex exponentials, with gcd(M i , N i ) = 1, is periodic and its period is given by the least common multiple of {N 0 , . . . N R−1 }.
Proof: The addition of a constant signal to a periodic signal does not modify the period, therefore the Fourier frequency 0 is not considered. Let L be the least common multiple of the set of denominators {N i : i ∈ /0, R − 1/}, thus L is a repetition time of the linear combination {s n }. Assume the period T is less than L, then The period of a periodic signal is given by the least common multiple lcm( ) of its period support.
Corollary 3: The period-frequency support of a p αperiodic signal, where p is a prime number and α is a positive integer, includes a point (p α , 2π q) with first coordinate p α .

A. SUMS OF PERIODIC SIGNALS
The sum of two periodic signals is periodic since the least common multiple of their periods is a positive repetition time of the sum.
Corollary 4: The period of a sum of periodic signals is given by the least common multiple of the periods of the complex exponentials in the summands that do not cancel out.
Proof: It follows from Lemma 9 and from the fact that the expansion of a periodic signal into a linear combination of complex exponentials is unique.
The period of a sum of periodic signals is a divisor of the least common multiple of the periods of the summands.
Corollary 5: If the period of the sum of two periodic signals is smaller than the least common multiple of the periods of the signals being added then the periods share at least one common lpp factor.
Proof: We prove the contrapositive. Assume the periods n and m of the signals being added do not share a common lpp factor; that is, with n = p α i i and m = p β i i , as in Equation (5), assume that whenever α i = 0 or β i = 0, then α i = β i . Then, since for each α i > 0, at least one complex exponential of period p α i i composes one of the signals, and likewise, for each β i > 0, at least one complex exponential of period p β i i is a term of the other signal, no cancellation of these complex exponentials of lpp factor periods is possible. Then the period of the sum is the least common multiple of m and n.
For example, since 12 = 2 2 × 3 and 18 = 2 × 3 2 have no lpp factor in common, the period of the sum of signals of periods 12 and 18 is always 36. On the other hand, the period of the sum of signals of periods 10 = 2 × 5 and 15 = 3 × 5 can be 6 = 2 × 3. of r + s is less than lcm(R, S), then, since the lpp factors missing in T are present in both R and S, the corollary is still true.

B. STRONG AND WEAK PERIODICITIES
For each frequency 2π k N in the spectrum support of an Nperiodic signal, either gcd(N, k) = 1, or gcd(N, k) > 1; in the first case, the corresponding complex exponential e j 2π N kn has period N and, in the second case, a period that is a proper divisor of N. Accordingly, we partition the spectrum support of the N-periodic signal into two subsets, s N and s are said to be the strongly periodic and weakly periodic components of s, respectively. The signal s can be weakly periodic only if at least two primes divide N; thus, if N is a power of a prime, N = p α , with p prime, s is strongly periodic. Such is the case of the 8periodic signal cos nπ + cos n π 2 + cos n π 4 . All periods in the period support of a signal whose period is the power p α of a prime p are powers of p. Lemma 11 below is used to prove Lemma 12.
Proof: Note that the set of vertices determines a regular N-gon in the upper complex plane, z ≥ 0, with a vertex at the origin. It is not hard to show, by scaling and rotating the standard polygon with vertices e j 2π N k , k ∈ /0, N − 1/, centered at the origin, that the polygon in (41) has center at e j( π The average of the vertices gives the center of the polygon, therefore ; that is, which is the lemma. 9 You have, therefore, Lemma 12: The signal 0, 1, . . . N − 1 is strongly periodic. Proof: Since it holds in general that gcd(1, N ) = gcd(N − 1, N ) = 1, 9 Incidentally, for ω = 0, mod-2π , the series ∞ n=1 ne jωn is Abel summable to 1 2 1 cos ω−1 . In fact, since ∞ n=1 nz n = z (1−z) 2 , |z| < 1, the Abel means of the series are A(r) = ∞ n=1 n(re jω ) n = re jω (1−re jω ) 2 , for r < 1, and, in the limit, as it is sufficient to prove that the coefficient N n of the exponential e j 2π N n , in the expansion N−1 k=0 X k e j 2π N nk of the signal, is not null. In fact, as the previous lemma says. For example, the strongly periodic signal cos( 2π 12 n)n of period 12 plus the weakly periodic signal cos( 2π 5 n) − cos( 2π 12 )n of period 60, have a sum of period 5. Also, the signal 0, 1, 2 + 0, 1, of period 6, plus the signal 0, 1, 2, 3, 4 − 0, 1, of period 10, give the signal 0, 1, 2, 3, 4 + 0, 1, 2, of period 15.
The method of the proof of Lemma 12 can be used in other cases, for example, Proof: In the first case, X 1 = e j 2π N (N−1) = 0 and, in the second case, X 1 = N−1 n=M>0 e j 2π N n = 0.

C. THE CASE WHEN THE PERIOD OF A SUM OF PERIODIC SIGNALS IS LESS THAN THE LEAST COMMON MULTIPLE OF THE PERIODS OF THE SUMMANDS
Let s and t be periodic signals with period supports s and t , respectively. Let N = LCM( s ) and M = LCM( t ) be the corresponding periods. Let s = s N and t = t M be the strongly periodic components, and s = d|N,d<N s d and t = d|M,d<M t d be the weakly periodic components of the signals, as in Equations (39) and (40). The period support s+t of s + t is not necessarily s ∪ t , due to possible cancellation of complex exponentials; the smallest possible period support of s + t is the symmetric difference ( s ∪ t ) − ( s ∩ t ), since s ∩ t is the set of the periods of the complex exponentials, common to s and t. We are interested in the case LCM( s+t ) < LCM{LCM( s ), LCM( t )}. Proof: Without loss of generality, suppose N > M. If s = 0 then N ∈ s , and a complex exponential of period N composes s, which will not cancel out when added to t. Thus, no cancellation of common lpp factors is possible, and each lpp factor of N divides the period of the sum. Of course, no cancellation of non-common lpp factors is possible either. Each lpp factor of s and t divides the period of s + t, which is then the LCM of N and M. If t = 0, and M-periodic components of s cancel out t , then M|N and the period of the sum is still N. If t is not cancelled out, the period of the sum is the LCM of N and M.
Corollary 8: If M is a proper divisor of N, and s is strongly periodic, then the period of s + t is N.
If all summands in a finite sum of periodic signals of different periods are strongly periodic, the period of the sum is the least common multiple of the periods of the summands. The period of the sum of two strongly periodic signals of the same period may be smaller if, in addition to the strongly periodic components cancelling out, the weakly periodic components are not full or, by further cancellation of complex exponentials of equal frequencies, the least common multiple of the resulting period support is smaller.
Lemma 17: If a sum of two periodic signals has a period smaller than the least common multiple of the periods of the signals being added then it must be the case that the periods have at least one common lpp factor p α Proof: If signals s and r of periods R = p α i i and S = p β i i , respectively, have sum t of period T = p γ i i , where the α i 's, β i 's and γ i 's are nonnegative integers and the p i 's are the prime numbers in ascending order. By Corollary 6, it must be the case that γ i ≤ α i and γ i ≤ β i and then α i = β i .
, with the proviso that x N := x 0 and X N := X 0 . Proof: x n e −j 2π N nk , then x n e −j 2π N (N−n)k or, changing the order of the terms,

E. SEPARATE SUPERPOSITIONS OF ROUGH AND SMOOTH COMPLEX EXPONENTIALS
Each Ramanujan sum c N (n) adds the complex exponentials of period N, of both large and small average variation. The average variation is a subadditive functional; we consider briefly the signals that result from the separate addition of complex exponentials of small and large variation, as the period ranges as N ∈ /N 1 , N 2 /, with, say N 1 = 2 and N 2 = 30. Consider thus sums with k(N ) being either the integer relatively prime to N that makes the corresponding cosine smoothest (with k(N ) = 1 or k(N ) = N − 1), or roughest (k(N ) ≈ N 2 ). The periodfrequency support of {s n } is either peripheral (in the smooth case) or central (in the rough case); see Figs. 11, 12 and 13.

VI. THE DFDT TRANSFORM: AN EXTENSION OF THE RFT
Series of periodic complex exponentials, of which the Ramanujan-Fourier series are a particular case, provide the Signal Processing and the Time Series Communities with a theoretical source of nonperiodic signals that are "bigger" than those with a DTFT. Based on the notion of average, we present a formalism and a corresponding space of signals, analogous to that used by Carmichael in the context of the Ramanujan-Fourier series.
Ramanujan [20] considered series of Ramanujan sums. Each such Ramanujan series, also known as a Ramanujan-Fourier series, is a series of periodic complex exponentials where the weight of the complex exponentials of each period is the same. The period of c N (n) is N, yet, a large period is not a synonym of smooth, as the average variation can be large; see Fig. 7. Ramanujan series were initially proposed as arithmetic functions, i.e. meaningful sequences for number theory [26]. In signal processing, it is advantageous to consider n ∈ Z, n ∈ R and n ∈ C as well. Planat [27] has considered Ramanujan series for the modelling of low-frequency, 1/ f noise.

A. THE RAMANUJAN FOURIER TRANSFORM
With Equation (42) Both the DFDT and the RFT assign (one-sided) discrete signals to (two-sided) discrete signals. Thus, for example, the inverse RFT of the signal { 1 N 2 : n ≥ 1} is the signal 6 π 2 σ (n) n , and the inverse RFT of the signal { 1 N : N ≥ 1} is the zero signal 0(n).
Given the signal {s n }, the left hand side of Equation (42), the matter of how to compute its RFT, the sequence of coefficients {α N }, arises. This is achieved with large generality using a formula proposed by Carmichael in 1932 [32]. The formula is the limit of an average and can be interpreted as an inner product of sorts. We use a similar approach for the computation of the DFDT. In Carmichael's deduction there is a limit exchange that is not always valid, as he points out, and the formula fails to cover certain cases of Ramanujan-Fourier series, such as the case of α N = 1 N . More study is necessary regarding the domain and the kernel of the inverse RFT.

B. SIGNALS OF BOUNDED AVERAGE, OF BOUNDED AVERAGE MAGNITUDE, AND OF BOUNDED AVERAGE SQUARE MAGNITUDE
For brevity, in this Section, we consider sequences N → C that start with the subindex 0. Let the magnitude |s| of a signal s = {s n } be given its componentwise magnitude, |s| = {|s n |}, and, similarly, let the square of the signal be given by its componentwise square: s 2 = {s 2 n }. The average (or arithmetic mean) of a one-sided sequence {s n , n ∈ N} is given by Note that, if s n → L, then s = L; also, if s ∈ l ∞ , then |s| ≤ ||s|| ∞ . The average square magnitude of the signal s is denoted There are bounded signals with no average. Consider for example the signal {1, −1, −1, 1, 1, 1, 1, −1, −1, −1, −1, −1, −1, −1, −1, . . .}; see [34]. [19] is a good source for spaces of discrete signals.
Denote as a the linear space of the signals with a finite average, the space of the signals with a finite average magnitude as b 1 , and the space of the signals with a finite average square magnitude as b 2 . Also, denote the space of the signals having zero average as a 0 , the space of the signals having zero average magnitude as b 10 , and the space of the signals having zero average square magnitude as b 20 . Note that each summable signal has a zero average; also, that each signal summable in magnitude has zero average magnitude, i.e. l 1 ⊂ b 10  Note that l 1 = b 10 since the signal { 1 n , n ≥ 1} of Example VI-B1 belongs to b 10 − l 1 . Also, remember that l 1 ⊂ l 2 10 since, for s ∈ l 1 , ∞ n=0 |s n | 2 = n:|s n |≥1 |s n | 2 + n:|s n |<1 |s n | 2 ≤ n:|s n |≥1 |s n | 2 + n:|s n |<1 |s n |, 10 In general, whenever 0 < p 1 ≤ p 2 , l p 1 ⊂ l p 2 . the first sum being finite, and the second being smaller than its magnitude sum. The signal of Example VI-B1 is in l 2 − l 1 , and in b 20 .

1) EXAMPLE
The z-transform of 1 n u n−1 is − log(1 − z −1 ), |z| > 1; also, its average is zero since tends to zero, as N tends to infinity, and so, 1 n tends to zero, as well. This is also an example of a signal not in l 1 but having a DTFT (except at θ = 0): |S(θ )| is an unbound, convex function for θ ∈ (0, 2π ), with a minimum at θ = π of |S(π )| = ln (2).

2) EXAMPLE
In [33], Hecke mentions the formula x n y * n ; for signals t ∈ b 2 , with t, t = 0, you have Cauchy-Schwartz inequality since, for s ∈ b 2 , or, This map , is not quite an inner product due to the fact that there are nonzero signals s ∈ b 2 for which s, s = 0. By considering the space b 2 b 20 of equivalence classes s of signals in b 2 , modulo signals in b 20 , you get what we may term Carmichel's inner product given by, with so and to arbitrary signals in b 20 : (s n t * n + s n to * n + so n t * n + so n to * n ) = s, t + s, to + so, t + so, to  Proof: It follows from Lemma 20. Going back to (two-sided) signals Z → C, for s and t as in Equation (30), let their correspondingly extended inner product be For example, if r is the signal {. . . 0, 0, 1, 1 2 , 1 3 , . . .} of example VI-B1; then, since r ∈ b 20 , r, {e j2πq l n } = 0.

D. THE DFDT TRANSFORM
A natural extension of the RFT consists in allowing each complex exponential to have a different weight, while still using a series of the periodic complex exponentials, of frequencies inˆ = {2π q : q ∈Q}. The generalization, called the Discrete-Frequency, Discrete-Time (DFDT) Fourier transform, provides a tool that extends the current uses of the RFT for Signal Processing. The DFDT transform s → b has inverse where s : Z → C ∪ {∞} is and b : N → C. Each coefficient b q , q ∈Q corresponds to the frequency θ q = 2π q ∈θ . The transform signal {b q k }, or {b k } for short, can be often computed using Carmichael's inner product.

E. COMPUTATION OF THE DFDT TRANSFORM
In many cases, the DFDT {b q k }, abbreviated {b k }, of signal s n = q∈Q b q k e j2πqn can be obtained with Carmichael's inner product of Equation ( together with s n = q∈Q b q e j2πqn is a DFDT -DFDT −1 pair. For signals x n = ∞ k=0 X k e jq k n and y n = ∞ l=0 Y l e jq l n , if the limit exchange step from Equation (48) to Equation (49) is valid, Equation (54) computes the DFDT transform of x. Alas, the formula lacks generality, as the mentioned limit exchange is not always possible. In particular, for s n = ∞ k=0 b q k e j2πq k n , with s ∈ b 20 − {0}, is not valid since, otherwise, and s = 0.

F. DFDT TRANSFORM OF A TIME-INVERTED SIGNAL
Since a time inversion of the signal s corresponds to a reshuffling of the frequencies of its DFDT transform; if the transform of for k ∈ /1, n s+1 − n s /, where n s := s r=1 ϕ(r); vertically downshifting the portion θ ∈ (π, 2π ) of the period-frequency matrix in Fig. 10. Alternatively, using negative frequencies, as in Section IV-D, with θ q = 2π q, if S(θ q ) is the DFDT transform of {s n }, the transform of {s −n } is S(−θ q ). The DFDT is asymmetric in the sense that, in the time domain, you have two-sided signals {s n : n ∈ Z} while, in the frequency domain, you have one-sided signals {b k : k ∈ N}, unless you consider negative frequencies and the rationals in (− 1 2 , 1 2 ] instead ofQ, and their corresponding ordering, mentioned in Section IV-D.

G. THE RFT AS A PARTICULAR CASE OF THE DFDT TRANSFORM
The inverse RFT of Equation (42) can be seen as a case of the inverse DFDT of Equation (51), with b k = a η(q k ) , where η(q) = 1/τ (q) is the denominator function; that is, where r := min t : l ≤ t ν=1 ϕ(ν), since, as Ramanujan proved, for n ≥ 1, ∞ k=0 b k e j2πq k n = ∞ k=1 1 k c k (n) = 0(n). In an inverse DFDT transform, the periods of the complex exponentials grow with the summation index. Since the average variation of the complex exponentials of a given period varies, you may consider separate series of rough and smooth periodic complex exponentials, as was done in Section V-E for finite sums. The N-periodic complex exponentials of smallest average variation are those of Fourier frequencies 2π 1 N and 2π N−1 N = −2π 1 N . A real signal with smoothest Fourier components of all periodicities, is s n = ∞ N=1 a N cos 2π 1 N n For series of roughest complex exponentials, with frequencies closest to π , r n = a 2 cos(nπ ) + ∞ N=2 a 2 N cos π − 2π 1 2 N n + ∞ N=1 a 2N+1 cos π − 2π 1 2(2N + 1) n Truncated versions of these series are shown in Figs. 12 and 13.

VII. CONCLUSION
The distribution of the average power on the period-frequency matrix is a tool for filter design. Knowledge of the transfer function H (θ ) of a discrete convolution filter, and of the period of a unit-amplitude periodic complex exponential to be filtered, is not enough information to predict the output of the filter, and any band-pass filter will let pass complex exponentials of arbitrarily large periods. Most discrete signals in signal processing are uniformly sampled versions of continuous signals, that respect Nyquist sampling rate. If the continuous complex exponential e jωt = e j 2π τ t , of period τ , is sampled with sampling rate T −1 , the discrete complex exponential e jθn , with θ = 2π T τ results (for T = 1, θ = ω, and the periods of the discrete and the continuous exponentials coincide). Now, if T τ is rational, with corresponding irreducible fraction M N , the period of the discrete complex exponential is N, of corresponding temporal duration NT , which can be very large. Notice as well that there are continuous complex exponentials of frequency arbitrarily close to ω that, when sampled with the sampling rate T −1 , give rise to discrete periodic complex exponentials of arbitrarily large periods.
Series of discrete, periodic complex exponentials constitute an important model of signals, some of them integer valued. The integrality of Ramanujan sums makes them suitable for applications in cryptography, as well as in fixed-point digital machines. On the other hand, unbound signals are not amenable for their computation with computers but are of theoretical interest, e.g. in Number Theory and in Time Series Analysis.
Given a signal {s n } that is a series of periodic complex exponentials, the sinc-interpolated signal is a nonperiodic continuous signal, bandlimited to |ω| ≤ π , with a countably infinite spectrum that includes frequencies ω arbitrarily close to zero. The fact that extremely low frequency signals (e.g planetary magnetic fields [3], [2]) are hard to observe [4] (among other things, the antenna would be inordinately large) has made difficult to observe such spectra. If s n = k X k e jθ k n is a linear combination of complex exponentials, e.g. a Ramanujan sum, the continuous interpolated version according to Equation (57), is the continuous signal f (t ) = k X k e jθ k t , and the filtering by period of f (t ) can be done in the discrete domain.
Signal Theory goes hand in hand with System Theory, as systems process signals. Mathematicians have considered often the case of almost periodic signals, as solutions of difference equations and their corresponding discrete systems. Almost periodic solutions of difference equations arise in practical situations; a subject that merits further research in Signal Processing [37].
The restriction of Thomae's function to the rationals in [0, 1] relates the period and Fourier frequency of the periodic complex exponentials, and its use is novel in Signal Processing. Also novel is the consideration of other signals defined onQ, such as the DFDT transforms (of series of periodic signals).
We have not considered amplitude-modulated signals, even though, in practice, signals are windowed, as they approximately exist over a finite interval only. Neither have we considered frequency-modulated signals. The subject of additive noise has not been considered either.
Whether a signal is periodic or not depends on knowing the whole signal. In practice, for a streaming signal, you can only know if, at a given point, the signal has repeated itself, or not. We are working on an algorithm that tells how many times (≥ 0) a signal being monitored has repeated itself so far.