The quantization of the mirror curve to a toric Calabi-Yau threefold gives rise to quantum-mechanical operators. Their fermionic spectral traces produce factorially divergent power series in the Planck constant, which are conjecturally captured by the refined topological string in the Nekrasov-Shatashvili limit via the Topological Strings/Spectral Theory correspondence. In this talk, I will discuss how the machinery of resurgence can be applied to study the non-perturbative sectors associated with these asymptotic expansions, producing infinite towers of periodic singularities in the Borel plane and infinitely-many rational Stokes constants, which are encoded in generating functions given in closed form by q-series. I will then present an exact solution to the resurgent structure of the semiclassical limit of the first fermionic spectral trace of the local P^2 geometry, which unveils a remarkable arithmetic construction. The same analytic approach is applied to the dual weakly-coupled limit of the conventional topological string on the same background. The Stokes constants are explicit divisor sum functions, the perturbative coefficients are particular values of known L-functions, and the duality between the two scaling regimes appears in number-theoretic form. This talk is based on arXiv:2212.10606.