How to memorize Master Theorem?
The key to memorizing the master theorem is to simplify it. There's an approximation to reality that is correct in 99% of the cases. A good (but not technically correct) summary of the Master Theorem is as follows:

If $T(n)=aT(n/b) + f(n)$ then compare $n^{log_b a}$ with $f(n)$

If $f(n) &lt; n^{log_b a}$, then $T(n)=n^{log_b a}$

If they are equal, then $T(n)=f(n)\log n$

If $f(n) &gt; n^{log_b a}$, then $T(n)=f(n)$



Basically, you compare $n^{log_b a}$ with $f(n)$ and the larger of the two is your running time; however if they are equal (for some strange definition of equal) then you get an extra $log$-factor in the running time. This sentence is all you really need to know.
Caveats
The most important one is in the meaning of &quot;equal&quot;. For the purpose of the master theorem $f(n)$ is equal to $n^{log_b a}$ if the difference between them is less than polynomial. So, for instance, if $f(n)=n^{log_b a}\log n$ or $f(n)=n^{log_b a}\log^3 n \log \log n$ this would still count as &quot;equal&quot;. The difference needs to be at least a factor $n^\epsilon$ for some $\epsilon&gt;0$.
Another caveat is that for the third case ($f(n)$ exceeds $n^{log_b a}$ you also need a condition that $f(n)$ does not grow &quot;too quickly&quot;. This is rather pathological and not likely to be an issue in practice, but something you should be aware of. The formal condition is that $af(n/b)$ should be less than $f(n)$ (for sufficiently large $n$, and where &quot;less&quot; is interpreted as &quot;there is a $k&lt;1$ such that $af(n/b)\leq kf(n)$).