Studying number theory with deep learning: a case study with the Möbius and squarefree indicator functions
No official code found. Best implementation: davidlowryduda/mobius_case_study (1 star, Jupyter Notebook, last commit 2025-07-23).
Abstract
Building on work of Charton, we train small transformer models to calculate the Möbius function $μ(n)$ and the squarefree indicator function $μ^2(n)$. The models attain nontrivial predictive power. We apply a mixture of additional models and feature scoring to give a theoretical explanation.