Suppose we let A be all sequences of zeros and ones, with generating function $F (z) = 1/(1 − 2z)$.
Now suppose we can attach a single or double prime to each $0$ or $1$, giving $0′$ or $0′′$ or $1′$ or $1′′$, and we want a generating function for the number of distinct primed bit-strings with $n$ attached primes.
The set { $’$, $’’$} has generating function $G(z) = z + z^2$ so the composite set has generating function $$F (G(z)) = 1/(1 − 2(z + z^2 ))= 1/(1 − 2z − 2z^2 )$$
In this, when I extract the coefficient of $z^2$, I get $6$, but when I hand count there should be $12$. I got $6$ from $1 + 2(z + z^2 )+ 4(z + z^2 )^2$, and the $12$ comes from each option as a starter having two options for a secondary when $n = 2$.
I’m confused on why I’m getting $6$, because when I self count, I get pairs $(0,0’’), (0,1’’), (1,1’’), (1,0’’), (0’ ,0’), (0’ ,1’), (1’ ,1), (1’ ,0), (0’’ ,0), (0’’ ,1), (1’’ ,1), (1’’ ,0)$ which is $12$
I might be misinterpreting what the n is supposed to be? I thought it was supposed to be equal to the weight of the term so $z^2$ would have $n=2$?
Or I am misinterpreting what this generating function is counting?
$G(z)$ isn't the GF for $\{',''\}$ because they aren't numbers or a sequence.
$G(z)=z+z^2$ is the GF for $a_1=1, a_2=1, a_n=0, n\ge2$.
Your GF is A002605, $a_n = 2(a_{n-1} + a_{n-2})$.