Finding the time for an epidemic/computer virus to infect a population Question: "Suppose a computer worm makes 2 copies of itself on another computer in one millisecond. Estimate the time that is needed to spread to a population of 1,000,000 computers" How would I calculate time?
I am using a textbook by Goodrich, "Introduction to Computer Security" and they glaze over this in no detail but they do show a logarithmic graph similar to this. 
Picture is ONLY for show case what is occurring, it is not numerically tied to the question.

 A: Consider the situation at time $t$ where there are $n_i(t)$ infected computers and $n_c(t)$ clean computers. We know that $n_c(t)+n_i(t)=N$, the total number of computers.
The infected computers send out two worms each.
The first worms could infect $n_i(t)$ computers.
But some of the computers that receive worms are already infected. The number of clean computers that receive the worms is approximately $n_i(t)\times \frac {n_c(t)} N$. Therefore the number of clean computers is now $n_c(t)-\frac {n_i(t) n_c(t)} N$.
The second worms could also infect $n_i(t)$ computers.
But the number of clean computers has already decreased and the number of clean computers that receive these worms is $n_i(t) \times \frac {n_c-\frac {n_i(t) n_c(t)} N} N$
That leaves us with $n_c(t)-\frac {n_i(t) n_c(t)} N - n_i(t) \times \frac {n_c-\frac {n_i(t) n_c(t)} N} N$ clean computers.
And the number of infected computers is $N-n_c(t)+\frac {n_i(t) n_c(t)} N + n_i(t) \times \frac {n_c-\frac {n_i(t) n_c(t)} N} N$.
This is $n_i(t)+\frac {n_i(t) (N-n_i(t))} N + n_i(t) \times \frac {N-n_i-\frac {n_i(t) (N-n_i(t))} N} N$
$n_i(t+1)=n_i(t)+n_i(t)-\frac {n^2_i(t)} N + n_i(t)- \frac {n^2_i(t)} N - \frac {n^2_i(t)} N + \frac {n^3_i(t)} {N^2}$
$n_i(t+1)=3n_i(t)-3 \frac {n^2_i(t)} N + \frac {n^3_i(t)} {N^2}$
Putting this into Excel gave me these results:
0   1.000
1   3.000
2   9.000
3   27.000
4   80.997
5   242.971
6   728.735
7   2184.611
8   6539.527
9   19490.564
10  57339.450
11  162343.434
12  412242.755
13  796954.218
14  991628.912
15  999999.413
16  1000000.000

So about 16 milliseconds...
