Step 1: Count what 'at most $n$' means.
From $2n+1$ books, choosing at least one and at most $n$ books means we pick $1,2,\dots,n$ books. The number of ways is $\displaystyle\sum_{r=1}^{n}\binom{2n+1}{r}.$
Step 2: Use a symmetry of binomials.
Because $2n+1$ is odd, the coefficients pair up: $\binom{2n+1}{r}=\binom{2n+1}{2n+1-r}.$ So the first half of the row exactly mirrors the second half.
Step 3: Split the full sum.
The total of one full row is $\displaystyle\sum_{r=0}^{2n+1}\binom{2n+1}{r}=2^{2n+1}.$ By the mirror symmetry, the bottom half $r=0$ to $n$ is exactly half of this: $\dfrac{2^{2n+1}}{2}=2^{2n}.$
Step 4: Remove the $r=0$ term.
We want $r$ from $1$ to $n$, so we drop the $r=0$ term which is $\binom{2n+1}{0}=1$. Hence the count is $2^{2n}-1.$
Step 5: Use the given number.
We are told this equals $255$: $2^{2n}-1=255$, so $2^{2n}=256=2^8.$
Step 6: Solve for $n$.
Matching powers, $2n=8$, so $n=4.$ \[ \boxed{n=4} \]