Classical and Quantum Models and Arithmetic Problems