This seems more like the question "What is the probability of getting 5 heads in a row at some point when tossing a fair coin 100 times?". There's probably some niftier generating function approach; but here's my take...
Suppose $m = 3$. As we proceed along the string of nucleotides, we are transitioning from one trigram (3 character string) to another; for example if the string of nucleotides is:
$$AGCTACAACG...$$
we are looking at a sequence of $M-2$ trigrams (note that the last two characters of each trigram in the sequence are the same as the first two characters of the succeeding trigram):
$$AGC, GCT, CTA, TAC, ACA, CAA, AAC, ACG, ...$$
Suppose the pattern we seek is $ACG$. Then it must have preceded by one of the trigrams: $AAC, CAC, GAC, TAC$; and if we encounter one of those 4 trigrams, then in each case there is a $\frac{1}{4}$ chance that the next trigram will be $ACG$. This makes me think that we can model this as a Markov process.
So I think of this as there being 4 states: $ACG, xAC, xxA,$ and $xxx$ (for the last state, this is any trigram that does NOT end with "A", "AC", or "ACG"). Then the sequence of trigrams in the example I gave above is now the sequence of states:
$$xxx, xxx, xxA, xAC, xxA, xxA, xAC, ACG,...$$
The state transitions probabilities $P(\text{from state} | \text{to state})$ are:
$$P(xxx | xxx)=3/4, P(xxx | xxA)=1/4$$
$$P(xxA | xxx)=2/4, P(xxA | xxA)=1/4, P(xxA | xAC)=1/4$$
$$P(xAC | xxx)=2/4, P(xAC | xxA)=1/4, P(xAC | ACG)=1/4$$
$$P(ACG | ACG) = 1$$
with all omitted transitions above having $P=0$. $ACG$ is an absorbing state; and we will want to know the probability that our system enters state $ACG$ at some point during our stream of $M-2$ trigrams.
We can then define the transition matrix:
$$T = \begin{bmatrix}
\frac{3}{4} & \frac{1}{4} & 0 & 0\\
\frac{1}{2} & \frac{1}{4} & \frac{1}{4} & 0\\
\frac{1}{2} & \frac{1}{4} & 0 & \frac{1}{4}\\
0 & 0 & 0 & 1\\
\end{bmatrix}
$$
and initial state probabilities for the starting trigram / state being $xxx, xxA, xAC,$ and $ACG$ :
$$P=\begin{bmatrix}
\frac{43}{64} & \frac{16}{64} & \frac{4}{64} & \frac{1}{64}\\
\end{bmatrix}
$$
So $P_4 = \frac{1}{64}$ is the probability for a sequence of length $3$ being in the state $ACG$; and in general if
$$P' = P \cdot T^{M-3}$$
Then $P'_4$ is the probability that a string of $M$ nucleotides contains $ACG$ at least once. In particular, for $M=100$, this equals $\approx 0.796888$, so roughly %80.
The above will hold for any trigram having distinct letters; but things are slightly different for patterns with duplicate letters.
Best Answer
Depends on the length of DNA.
For example, if the length of DNA is, say 3 units, then answer to your first question will be zero.
Let the DNA be an N unit closed chain.
Part (a) $$P(sequence\ occur\ somewhere)=1-P(sequence\ does\ not\ occur\ anywhere)$$ Now, \begin{align}P(sequence\ does\ not\ occur\ at\ position\ i)&=1-P(sequence\ occur\ at\ position\ i)\\ P(sequence\ does\ not\ occur\ at\ position\ i)&=1-\frac{1}{4^6}\end{align} Multiplying the probability that sequence does not occur at any position 1, 2, 3, ... N we get, $$P(sequence\ does\ not\ occur\ anywhere)=\left(1-\frac{1}{4^6}\right)^N$$ Therefore, $$P(sequence\ occur\ somewhere)=1-\left(1-\frac{1}{4^6}\right)^N$$
For Part (b) replace $4^6$ with $4^k$ in the above.