Question: When is $a(n)\in P$ compared to all possible values of $n$? where $P$ denotes the set of primes. What is the density of the primes in the sequence?
Consider the sum of the prime counting function.
$$ a(n)=\sum_{k=1}^{n} \pi(k) $$
Let $S(n)$ be a string of length $n$, then $a(n)$ is the number of substrings of $S(n)$ with a prime number of characters. Example $1$: "$abcd$" is a string of length $4$; there are $a(4)=5$ substrings with a prime number of characters $(ab, bc, cd, abc, bcd)$. Example $2$: "$abcde$" is a string of length $5$; there are $a(5)=8$ substrings with a prime number of characters $(ab, bc, cd, de, abc, bcd, cde, abcde)$.
What I'm asking is, when is the number of substrings of $S(n)$ with a prime number of characters itself prime?