Lets use inclusion-exclusion method.
First we find the number of bit-strings from size of $n$ that doesn't contain the sequence '000'. We will construct recursion formula, let $F(n)$ be that number.
- If the first bit is '1' then the rest is just a string that doesnt contain '000' from size $n-1$
- If the first bits is '01' then the rest is just a string that doesnt contain '000' from size $n-2$
- If the first bit is '001' then the rest is just a string that doesnt contain '000' from size $n-2$
Therfore we get:
$F(n) = F(n-1)+F(n-2)+F(n-3)$
With the initial conditions
$F(0) =1, F(1) =2, F(2) =2^2$
With te same method we get:
$G(n) = G(n-1)+G(n-2)+G(n-3)+G(n-4)$
With the initial conditions
$G(0) =1, G(1) =2, G(2) =2^2, G(3)=2^3$
Where $G(n)$ is the number of bit-strings from size of $n$ that doesn't contain the sequence '1111'.
Now, by opening the recursion up we get $F(8)= 149$ and $G(8)=208$
So if we define:
- A = bit-string of size 8 that contain '000'
- B = bit-string of size 8 that contain '1111'
and by what we calculated we have $|A| = 2^8-F(8)$ and $|B| = 2^8-G(8)$
What left to complete inclusion exclusion is to find the size of $|A\cap B|$, which is easy since the only strings that satisfy both are:
'00001111' , '11110000', '11111000', '00011111', '00011110', '10001111', '01111000', '11110001'
Now the desiered number is $|A|+|B|-|A \cap B|$
Your case 3 is not correct. $4 \choose 2$ is the number of ways to combine two prime factors, but you count $77,10,1,1$ twice, once when you choose $7,11$ for the two and once when you choose $2,5$. This divides the cases by $2$. You must have added wrong, because that correction reduces the total and the answer comes out $256$ as desired.
Best Answer
$abc=30$
First write $30$ as the prime factors
$30=2\times3\times5$
$a=2^{x_1}\times3^{y_2}\times5^{z_3}$
$b=2^{x_2}\times3^{y_2}\times5^{z_2}$
$c=2^{x_3}\times3^{y_3}\times5^{z_3}$
$$abc=30$$ $$2^{{x_1}+{y_1}+{z_1}+{x_2}+{y_2}+{z_2}+{x_3}+{y_3}+{z_3}}=30$$note that $$x_1+x_2+x_3=1...(1)$$$$y_1+y_2+y_3=1....(2)$$$$z_1+z_2+z_3=1.....(3)$$ Notice that $(1),(2),(3)$ have only $3$ solutions each
So, the total number of solutions are $3\times3\times3=27$