Quantum integer (source code)

= Quantum integer
{title2=$[n]_q=(q^n-q^{-n})/(q-q^{-1})$}

The symmetric quantum integer is the displayed <Laurent polynomial>, with $[0]_q=0$. It obeys $[n+1]_q=q^{-1}[n]_q+q^n$ and $[r]_q[s+1]_q-[s]_q[r+1]_q=[r-s]_q$. At a primitive odd $\ell$th <root of unity>, $[n]_q=0$ exactly when $\ell$ divides $n$.