{
  "id": "2015",
  "ident": "NS.02015",
  "slug": "erdos-403",
  "title": "Erdős Problem 403",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Does the equation\n$$2^m=a_1!+\\cdots+a_k!$$\nwith $a_1<a_2<\\cdots <a_k$ have only finitely many solutions?\n\nAsked by Burr and Erdős. Frankl and Lin [Li76] independently showed that the answer is yes, and\nthe largest solution is\n$$2^7=2!+3!+5!.$$\nIn fact Lin showed that the largest power of $2$ which can divide a sum of distinct factorials\ncontaining $2$ is $2^{254}$, and that there are only 5 solutions to $3^m=a_1!+\\cdots+a_k!$\n(when $m=0,1,2,3,6$).\n\nSee also [404].\n\nA solution is encoded below as a pair $(m, s)$ where $s$ is the finite set\n$\\{a_1 < a_2 < \\cdots < a_k\\}$ of positive integers, so the distinctness of the $a_i$ is\ngiven by set membership. The empty set contributes no solutions since $2^m \\geq 1 > 0$.\n\nThe linked proof gives more than finiteness: it classifies the solutions outright, as\n$(0,\\{1\\})$, $(1,\\{2\\})$, $(3,\\{2,3\\})$, $(5,\\{2,3,4\\})$ and $(7,\\{2,3,5\\})$, so the set below\nhas exactly five elements.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos403.erdos_403",
  "statement_lean": "theorem erdos_403 :\n    {p : ℕ × Finset ℕ | (∀ a ∈ p.2, 0 < a) ∧\n      2 ^ p.1 = ∑ a ∈ p.2, a.factorial}.Finite",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Erdős Problem 403\n\n*References:*\n- [erdosproblems.com/403](https://www.erdosproblems.com/403)\n- [ErGr80] Erdős, P. and Graham, R., *Old and new problems and results in combinatorial\n  number theory*. Monographies de L'Enseignement Mathématique (1980).\n- [Li76] Lin, S., *On two problems of Erdős concerning sums of distinct factorials*.\n  Bell Laboratories internal memorandum (1960).\n-/\n\n@[expose] public section\n\nnamespace Erdos403\n\nset_option linter.style.formal_proof_palomar false in\n/--\nDoes the equation\n$$2^m=a_1!+\\cdots+a_k!$$\nwith $a_1<a_2<\\cdots <a_k$ have only finitely many solutions?\n\nAsked by Burr and Erdős. Frankl and Lin [Li76] independently showed that the answer is yes, and\nthe largest solution is\n$$2^7=2!+3!+5!.$$\nIn fact Lin showed that the largest power of $2$ which can divide a sum of distinct factorials\ncontaining $2$ is $2^{254}$, and that there are only 5 solutions to $3^m=a_1!+\\cdots+a_k!$\n(when $m=0,1,2,3,6$).\n\nSee also [404].\n\nA solution is encoded below as a pair $(m, s)$ where $s$ is the finite set\n$\\{a_1 < a_2 < \\cdots < a_k\\}$ of positive integers, so the distinctness of the $a_i$ is\ngiven by set membership. The empty set contributes no solutions since $2^m \\geq 1 > 0$.\n\nThe linked proof gives more than finiteness: it classifies the solutions outright, as\n$(0,\\{1\\})$, $(1,\\{2\\})$, $(3,\\{2,3\\})$, $(5,\\{2,3,4\\})$ and $(7,\\{2,3,5\\})$, so the set below\nhas exactly five elements.\n-/\n@[category research solved, question, AMS 11, formal_proof using lean4 at \"https://github.com/Jayyhk/erdos-lean/blob/f8a51976fd2e66a52b4928c109fb9ae877a1a507/problems/403/Erdos403.lean\"]\ntheorem erdos_403 :\n    {p : ℕ × Finset ℕ | (∀ a ∈ p.2, 0 < a) ∧\n      2 ^ p.1 = ∑ a ∈ p.2, a.factorial}.Finite := by\n  sorry\n\nend Erdos403\n",
  "statement_hash": "50786fd054ade745e28f76fcc8f33952ee221960a071f1ed72adfb3153a25ba1",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}