/- Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ module public import FormalConjecturesUtil /-! # Erdős Problem 461 *References:* - [erdosproblems.com/461](https://www.erdosproblems.com/461) - [ErGr80] Erdős, P. and Graham, R., *Old and new problems and results in combinatorial number theory*. Monographies de L'Enseignement Mathematique (1980). -/ @[expose] public section namespace Erdos461 /-- The $t$-smooth component $s_t(n)$ of $n$: the product of all primes $p < t$ dividing $n$, counted with multiplicity. -/ def smoothComponent (t n : ℕ) : ℕ := (n.primeFactorsList.filter (· < t)).prod /-- The number $f(n,t)$ of distinct values of $s_t(m)$ for $m \in [n+1, n+t]$. -/ def f (n t : ℕ) : ℕ := ((Finset.Icc (n + 1) (n + t)).image (smoothComponent t)).card /-- Let $s_t(n)$ be the $t$-smooth component of $n$ - that is, the product of all primes $p$ (with multiplicity) dividing $n$ such that $p simp [smoothComponent, hp.primeFactorsList_pow, h] /-- For $t = 0$ the interval $[n+1, n]$ is empty, so $f(n,0) = 0$ and the bound in `erdos_461` holds trivially. -/ @[category test, AMS 11] theorem f_zero (n : ℕ) : f n 0 = 0 := by simp only [f, Nat.add_zero, Finset.Icc_eq_empty_of_lt (Nat.lt_add_one n), Finset.image_empty, Finset.card_empty] /-- For $t = 1$ the interval $[n+1, n+1]$ has one element, so $f(n,1) = 1$. -/ @[category test, AMS 11] theorem f_one (n : ℕ) : f n 1 = 1 := by simp only [f, Finset.Icc_self, Finset.image_singleton, Finset.card_singleton] end Erdos461