I am trying to find the number of linear sequences of length $100$ with a period of $10$ constructed using an alphabet of $a$ characters.
Here are my thoughts. The number of sequences of length $n$ and period $d$ is the same as the number of sequences of length $d$ and period $d$. So I need to find the number of linear sequences of length $10$ and period $10$.
Total number of linear sequences of length $n$ constructed with the alphabet of $a$ is $T(n) = a^n$. This total number consists of sequences with various periods (divisors of the $n$). Let $D(p)$ is the set of all the sequences of length $n$ with a period of $d$. So $T(n) = \sum_{d|n}D(d)$
But the number of sequences of linear sequences of length $n$ and period $d$ is the same as the number of linear sequences of length $d$ and period $d$. So if $W(d)$ is the same as the number of linear sequences of length $d$ and period $d$, then:
$$|T(n)| = a^n = \sum_{d|n}|W(d)|$$
So
$a^1 = |W(1)|$
$a^2 = |W(1)| + |W(2)|$
$a^5 = |W(1)| + |W(5)|$
$a^{10} = |W(1)| + |W(2)| + |W(5)| + |W(10)|$
So |W(10)| is $a^{10} - a^5 - a^2 + a$. And this is basically the answer.
But it looks like it is not correct.
Can anyone explain a correct approach?