Index of theproofnetwork/open-problems@860a535/Prove2Me/Definitions/Def_QED_M145.lean
qedmarket’s copy of theproofnetwork/open-problems@860a535, 3 Dec 2026original source ↗
/-From Prove2Me, definition `QED_M145` (https://prove2.me/definitions/d50709be-7328-4962-a1f6-3a1f02297489). Apache-2.0 per Prove2Me's terms.-/import Mathlib /-! QED-M145: Primes with equal binary and ternary digit sumsShow that there are infinitely many primes whose binary digit sum equals their ternary digit sum.Informal statement: Let $s_q(n)$ be the sum of the base-$q$ digits of $n$. Prove that there are infinitely many primes $p$ with $s_2(p)=s_3(p)$. (Stronger target, not formalized here: $\#\{p\le N:s_2(p)=s_3(p)\}\ge N^{c}$ for some $c>0$.)Formalization notes:* `Nat.digits q n` is the list of base-`q` digits of `n` (least significant first), so `(Nat.digits q n).sum = s_q(n)`.* `Claim` is the main statement (infinitely many such primes). Proving `¬Claim` means only finitely many primes have equal binary and ternary digit sums. The stronger counting target is a remark.-/namespace OpenProblems.QEDM145noncomputable section /-- Sum of the base-`q` digits of `n`. -/def digitSum (q n : ℕ) : ℕ := (Nat.digits q n).sum def Claim : Prop := {p : ℕ | p.Prime ∧ digitSum 2 p = digitSum 3 p}.Infinite endend OpenProblems.QEDM145