# Studying number theory with deep learning: a case study with the M"obius and squarefree indicator functions

arXiv: https://arxiv.org/abs/2502.10335 · HTML: https://mlsanity.com/paper/2502.10335/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 8 of its 22 references that are in the map.
- First posted on arXiv 14 Feb 2025.

## Builds on (most cited first, 8 of 8)

- [Generative Language Modeling for Automated Theorem Proving](https://mlsanity.com/paper/2009.03393/) (2020)
- [Neural GPUs Learn Algorithms](https://mlsanity.com/paper/1511.08228/) (2015)
- [Linear algebra with transformers](https://mlsanity.com/paper/2112.01898/) (2021)
- [Teaching Temporal Logics to Neural Networks](https://mlsanity.com/paper/2003.04218/) (2020)
- [Learning the greatest common divisor: explaining transformer predictions](https://mlsanity.com/paper/2308.15594/) (2023)
- [Transformer-based Machine Learning for Fast SAT Solvers and Logic Synthesis](https://mlsanity.com/paper/2107.07116/) (2021)
- [Detecting squarefree numbers](https://mlsanity.com/paper/1304.6937/) (2013)
- [Transformers to Predict the Applicability of Symbolic Integration Routines](https://mlsanity.com/paper/2410.23948/) (2024)

## Built on by (most cited first, 1 of 1)

- [On (not) learning the M"obius function](https://mlsanity.com/paper/2604.23427/) (2026)

## Abstract (arXiv)

Building on work of Charton, we train small transformer models to calculate the M"obius 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.
