2 = 1.01n
at this stage consider, taking the log of both sides.
.'. log 2 = log (1.01)n
here we use the rule, log an = n x log a.
.'. log 2 = n x log (1.01)
then it comes back to the same way as shown by pc,
n = log 2/ log 1.01
edit 1: when doing this keep in mind you cannot take the log of a negative number, ie log ( < 0). if you do get this, you have made a mistake in leading up to when you take the log.
edit 2: use the two methods together, to make sure you are doing it right.