hmm -- https://looo.lol/?x=65536
https://looo.lol/?x=1 (I like the “Binary math can seem hard, but it's actually quite simple.”)
1) off by one errors
(in this case it comes in the annoying form of messed up floor/ceil calculations)
But the number of values is just 2^n, because that includes zero.