## 2 Mathematical Framework  
In this section, the mathematical background for the calculation of the power spectral density of a sequence of events correlated according to a Markov chain and the conditions to yield a closed loop are recalled. The amplitude of the periodic and aperiodic components are derived for a single loop in Section 2.1 and for an arbitrary number of synchronized closed loops in the Section 2.2. Consider a neuron, in a state labelled \(\alpha_{1}\), making a firing to a neuron, in a state labelled \(\alpha_{2}\), in a sequence \(\alpha_{1},\alpha_{2},\ldots,\alpha_{N}\) of \(N\) states. Let \(n_{1},n_{2},\ldots,n_{N}\) indicate the numbers of neurons, respectively, in the states \(\alpha_{1},\alpha_{2}\ldots\alpha_{N}\). The firings of \(n_{1}\) synchronized neurons result in the subsequent firing of \(n_{2}\) neurons, yielding a total of \(n_{1}\cdot n_{2}\) synchronized neurons, and so on. Hence, the number of synchronized neurons may reach a value of the order of several thousands in a relatively short time. For the sake of the example, if each of the \(n_{1},n_{2},\ldots\) produces a pair of simultaneously firing neurons with a firing characteristic time of 5 ms, a total number \(N_{i}\) of about \(10^{7}\) synchronized neurons would be produced in only 0.1 s. The same process occurs on the neurons in the sequence \(\alpha_{2},\alpha_{3},\ldots,\alpha_{N}\) of the \(N\) connected states. Thus, a bunch of \(N\) groups of \(N_{i}\) synchronized neurons for each state \(\alpha\) of the sequence could be expected. The neuron firing pulses can be described in terms of functions \(F_{\alpha_{i}}(t)\), where \(t\) is the time and \(\alpha_{i}\) is one of the \(N\) states which completely characterizes the firing. The superposition of individual firing \(F_{\alpha_{i}}(t-t_{i})\), where \(t_{i}\) is the time origin arbitrarily chosen for each \(F_{\alpha_{i}}(t)\) defines the relevant neurological signal as \(I(t)=\sum_{i=-\infty}^{\infty}F_{\alpha_{i}}(t-t_{i})\). The time interval between subsequent events \(F_{\alpha_{i}}(t)\) and \(F_{\alpha_{i+1}}(t)\) is indicated by the variable \(u_{i}\), which depends on the states \(\alpha\) through the distribution function \(q_{\alpha_{i},\alpha_{i+1}}(u_{i})\), accounting for the correlation between the time intervals \(u_{i}\). The \(\alpha\) states are represented by an homogeneous Markov chain characterised by the \(N\times N\) matrix \(m\) with entries defined as the conditional probability that if the event \(i\) is in a state \(\alpha\), the event \(i+1\) will be in the state \(\alpha^{\prime}\), where \(\alpha\) and \(\alpha^{\prime}\) are a pair of \(N\) states:  
\[m_{\alpha_{i},\alpha_{i+1}}=P(\alpha_{i+1}=\alpha^{\prime}|\alpha_{i}=\alpha) \tag{1}\]  
Then, the matrix \(M(u)\) can be built with entries:  
\[M_{\alpha,\alpha^{\prime}}(u)=m_{\alpha,\alpha^{\prime}}q_{\alpha,\alpha^{ \prime}}(u), \tag{2}\]  
where \(\alpha\) and \(\alpha^{\prime}\) are the states of a pair of successive events of the sequence and \(q_{\alpha,\alpha^{\prime}}(u)\) the distribution function of the time interval between the pair. The Fourier transform of \(M_{\alpha,\alpha^{\prime}}(u)\) is defined as:  
\[M_{\alpha,\alpha^{\prime}}(\omega)=m_{\alpha,\alpha^{\prime}}Q_{\alpha,\alpha^ {\prime}}(\omega), \tag{3}\]  
where:  
\[Q_{\alpha,\alpha^{\prime}}(\omega)=\int_{0}^{\infty}q_{\alpha,\alpha^{\prime }}(u)\exp(i\omega u)du, \tag{4}\]  
\(M_{\alpha,\alpha^{\prime}}(\omega)\) defines the entries of the correlation matrix \(M(\omega)\) of the Markov process. The power spectrum of random processes correlated according to a Markov chain is given by:  
\[\Phi(\omega)=\upsilon\overline{|S_{\alpha}(\omega)|^{2}}+2\
u\operatorname{ Re}\sum_{\alpha\alpha}S_{\alpha}^{*}(\omega)S_{\alpha^{\prime}}(\omega)p_{ \alpha}K(\omega)_{\alpha\alpha^{\prime}}\quad, \tag{5}\]  
where \(\
u\) is the average number of events per unit time, \(S_{\alpha}(\omega)\) is the Fourier transform of \(F_{\alpha}(t)\), with the overline indicating the average over all the pulses in the sequence.