Occasionally I find myself in a situation where a naive, non-rigorous computation leads me to a divergent sum, like $\sum_{n=1}^\infty n$. In times like these, a standard approach is to guess the right answer by assuming that secretly my non-rigorous manipulations were really manipulating the Riemann zeta function $\zeta(s) = \sum_{n=1}^\infty n^{-s}$ and its cousins. Then it's reasonable to guess that the "correct" answer is, for example, $\sum_{n=1}^\infty n = \zeta(-1) = -\frac1{12}$. Thus the zeta function and its cousins are a valuable tool for other non-number-theoretic problem solving: it's always easier to rigorously prove that your guess is correct (or discover, in trying to prove it, that it's wrong) than it is to rigorously derive an answer from scratch.

I recently found myself wishing I could do something similar for the sum of the *quantum* integers. Recall that at quantum parameter $q = e^{i\hbar}$, *quantum $n$* is the complex number $$[n]_q = \frac{q^n - q^{-n}}{q - q^{-1}} = q^{n-1} + q^{n-3} + \dots + q^{3-n} + q^{1-n}.$$ The point is that $[n]_1 = n$.

Question:Are there established methods to sum the divergent series $\sum_{n=1}^\infty [n]_q $ and its cousins? For example, is there some well-behaved function $\zeta_q(s)$ for which the series is naturally the $s=-1$ value?

Note that when $n$ is a root of unity, the series truncates, and it would be nice (but maybe too much too hope for) if the regularized series agreed with the truncated series at these values.

I should mention also that I consider the following answer tempting but inaccurate, as it definitely doesn't work at roots of unity, which I do care about:

$$ \sum_{n=1}^\infty [n]_q = \frac1{q-q^{-1}} \sum_{n=1}^\infty (q^n - q^{-n}) = \frac1{q-q^{-1}} \left( \sum_{n=1}^\infty q^n - \sum_{n=1}^\infty q^{-n}\right) = $$ $$ = \frac1{q-q^{-1}} \left( \frac{q}{1-q} - \frac{q^{-1}}{1-q^{-1}}\right) = \frac{q+1}{(q-q^{-1})(q-1)}$$