Distinguishing Attack on CBC-MACs
Why approximately $2^{(n+1)/2}$ queries?  Because it makes the attack work.

As far as your final comment, it sounds like you are confusing $(n+1)/2$ with $2^{(n+1)/2}$.  If we use AES, then $n=128$, so $(n+1)/2=64.5$.  However, $2^{64.5}$ is a very large number.  The exact number of queries is not important as long as it is approximately $2^{64.5}$, and it is easy to choose an integer near that number.