{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/the-relative-entropy-of-primes-in-arithmetic","title":"The relative entropy of primes in arithmetic progressions is really small","arxiv_id":"2504.20691","date":"2025-04-29","proceeding":null,"authors":["Alex Cowan"],"abstract":"Fix a modulus $q$. One would expect the number of primes in each invertible residue class mod $q$ to be multinomially distributed, i.e. for each $p \\,\\mathrm{mod}\\, q$ to behave like an independent random variable uniform on $(\\mathbb{Z}/q\\mathbb{Z})^\\times$. Using techniques from data science, we discover overwhelming evidence to the contrary: primes are much more uniformly distributed than iid uniform random variables. This phenomenon was previously unknown, and there is no clear theoretical explanation for it. To demonstrate that our test statistic of choice, the KL divergence, is indeed extreme, we prove new bounds for the left tail of the relative entropy of the uniform multinomial using the method of types.","url_abs":"https://arxiv.org/abs/2504.20691v1","url_pdf":"https://arxiv.org/pdf/2504.20691v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"the-relative-entropy-of-primes-in-arithmetic","repo_url":"https://github.com/thealexcowan/reallysmall","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}