There is no hard rule when it comes to determining the number of classes for frequencies. As far as I can find, this kind of formulas was introduced as earlier as 1926 by Sturges (PDF), who actually suggested a slightly different formula, but you can see the justification being used and perhaps get a sense of the approaches in arguing for a certain formula. Scott in 1979 provided another algorithm (URL), which uses some amount of justification.
Both of these pieces are reference article of the
nclass() statement in
R, and I would assume they are somewhat representative. I have never seen $n \le 2^k$, but it does look like a derivative of Struges' work.
Also, most books have a page showing the corresponding author's e-mail. If you couldn't find the citation in the bibliography, you may consider sending him/her an e-mail.
Lastly, in Scott's article, I found one thing that he emphasized very insightful:
The optimal choice for $h_n$ [aka number of classes] requires
knowledge of the true underlying density $f$. This knowledge is rare.
At the end of the day, it's still your understanding of the data that rules the binning process. Any formula you may encounter on this matter is probably only able to give you a starting point.