Number of strings I have a (DNA) string of length l. e.g. ACG.
For each position in the string, there are 3 alternative values that the position can be changes to: A -> CTG, C-> ATG, T -> AGC, G -> ATC.
I am allowed to change d positions in the original string to any of the possible values for that particular position. This is called d-neighbourhood of a string. 
For instance, if d=1, I am allowed to change 1 value in the string ACG at any position. 
So the possible strings are: 
CCG
TCG
GCG
AAG
ATG
AGG
ACA
ACC
ACT
ACG

Here the number of strings generated is 9 + the original string (ACG).
I need to come up with the formula to calculate the number of strings generated for arbitrary l and arbitrary d (d <= l). 
So far, I have come up with: 
$$ \text{number  of  strings} = C_{l}^d * 3^d$$
but I am not sure if this is correct.
 A: Your  considerations are sound. Let me repeat the situation in slightly different words. We assume an Alphabet $V=\{A,C,G,T\}$, consider words of length $l$ and have a set of production rules to obtain a word from another one. These rules are
\begin{align*}
&A\longrightarrow C|T|G\\
&C\longrightarrow A|T|G\\
&T\longrightarrow A|G|C\\
&G\longrightarrow A|C|T\\
\end{align*}
The symbol `$|$' means or and provides alternatives. We observe a word $w$ is transformed into a word $w^\prime$ by applying to one or more characters of $w$ a corresponding production rule.

We conclude:
  
  
*
  
*Since each of  the characters  in $V$ has three production rules, changing $d$ characters in a word $w$ produces $3^d$ different words.
  
*In a word $w$ of length $l$ there are $\binom{l}{d}$ ways to select $d$ characters. So, we get a total of
  \begin{align*}
3^d\binom{l}{d}
\end{align*}
  different words having distance $d$ from $w$, since precisely $d$  characters have been changed.

Note: Usually,  when we are talking about a neighbourhood of a word $w$ of distance $d$, we mean all words which have distance $\leq d$ to the word. In this case we can say, there are
\begin{align*}
\sum_{j=0}^d\binom{l}{j}3^j
\end{align*}
different words in the $d$-neighbourhood of $w$, including the word $w$ itself, having distance $0$ from it.
