It seems natural to consider $\lim\_{q \rightarrow 1^-} \sum\_{n \in S} q^n - \sum\_{n \in T} q^n$, when it exists, as a way of comparing the sizes of two sets $S,T \subseteq {\bf N}$ that have the same density; for instance, $\{0,2,4,...\}$ and $\{1,3,5,...\}$ both have density 1/2, but the first set might be said to contain "half an element more" than the second, based on the fact that $1-q+q^2-q^3+...$ converges to 1/2 as $q$ goes to 1. Has this (non-Archimedean, non-translation-invariant) refinement of the concept of density, or anything similar to it, been developed anywhere?


Put $|S|\_q = \sum\_{n \in S} q^n$. Just as 
$|\{0,2,4,6,...\}|\_q-|\{1,3,5,7,...\}|\_q \rightarrow 1/2$ as $q \rightarrow 1^-$, it seems empirically that 
$$|\{0,1,4,9,16,...\}|\_q-|\{0,2,6,12,20,...\}|\_q \rightarrow 1/2,$$
$$|\{0,1,5,12,22,...\}|\_q-|\{0,2,7,15,26,...\}|\_q \rightarrow 1/3,$$ and
$$|\{0,1,3,6,10,..,\}|\_q - \sqrt{2} |\{0,1,4,9,16,...\}|\_q \rightarrow \sqrt{2}/2.$$ Is there a place in the literature where results like this can be found, as part of a general setup for measuring sets that "sees" things at a finer level than mere density? To give one last example, racing "evil" versus "odious" numbers, it is easy to prove that $$|\{0,3,5,6,9,10,12,15,...\}|\_q-|\{1,2,4,7,8,11,13,14,...\}|\_q \rightarrow 0.$$


[ADDED ON MAY 17, 2017: There is now (at least) one article that uses analytic tools to generalize the notion of cardinality of sets of natural numbers: my preprint "One-Dimensional Packing: Maximality Implies Rationality", available at <https://arxiv.org/abs/1704.08785> ]



Comparing sizes of sets of natural numbers
Different notions of summability have indeed been considered before (see in particular Abel summation). For example, in the study of primes a famous observation of Chebyshev is that there are more primes of the form $3\pmod 4$ than $1\pmod 4$. Usually this is interpreted in the sense of the number of primes up to $x$ that are $3\pmod 4$ is more than the number of primes that are $1\pmod 4$; this is true most of the time, but not always. Chebyshev's original formulation was along the lines of your question: he wanted to know if 
$$ 
\lim\_{q \to 1^-} \Big( \sum\_{p \equiv 3\pmod 4} q^{p} - \sum\_{p\equiv 1\pmod 4} q^p\Big) = \infty. 
$$ 
Hardy and Littlewood and Landau already noted a hundred years back that this is equivalent to the Riemann hypothesis for $L(s,\chi\_{-4}) =1/1^s-1/3^s+1/5^s-\ldots$. The same question for natural density is more subtle, involving not just RH but also relations among the zeros. In general the smooth sums in the question would be easier to handle than corresponding problems for the counting functions of the sets. For some references on the particular example given here, see [Ford and Konyagin](https://pdfs.semanticscholar.org/e29b/80d3ca8a3cec35c30a69f5346e133c371db3.pdf), [Rubinstein and Sarnak](https://projecteuclid.org/euclid.em/1048515870), or [Granville and Martin](https://arxiv.org/abs/math/0408319). 


