This is a continuation from Wilf's exercise on codewords (although this question is (mostly) independent from the previous question).
Question:
Suppose $n \in \mathbb{N}$ so that it can be written as $n = 2^\alpha n''$, with $n''$ being odd and consider the formula:
$$\beta_r = \frac{1}{2n} \sum _{j=1} ^{n''} 2^{2^\alpha \gcd(j,n'')} \exp \left(-\frac{2\pi i j}{n''} r\right)$$
Wilf's generatingfunctionology (Chapter 2, Ex 25e, first part of exercise):
Use Parseval's identity and the result of part (d) to find the variance of the occupancy numbers $\beta_0, ..., \beta_{2n - 1}$.
Given $N = \beta_0 + \beta_1 + ... + \beta_{2n - 1} = 2^n$.
Being unfamiliar with this theorem, I have read Parseval's identity from different websites (with different versions?), but am uncertain how this can be used since they seem to have it with infinite sums/integrals, whereas the question is made up of finite sums.
EDIT:
I figured the first part of the exercise in the answer, which gives variance to be: $$\sigma^2 = \frac{1}{4n^2}\sum _{j=1}^{n'' -1}\left( 2^{2^\alpha \gcd(j, n'') } \right)^2$$
This leaves the 2nd part:
Wilf's generatingfunctionology (Chapter 2, Ex 25e, second part of exercise):
Make an estimate that showsthat the variance is in some sense very small, so that this coloring scheme is shown to distribute codewords into color classes very uniformly.
And would like to ask again on how you would make an estimate with a function like $\gcd$ in it?