/- Copyright 2025 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. -/ import FormalConjecturesUtil

Erdős Problem 942

Reference: erdosproblems.com/942

open Nat Filter Topology namespace Erdos942

Let $h(n)$ count the number of powerful integers in $[n^2, (n + 1)^2)$.

def erdos_942.h (n : ) : := ((Finset.Ico (n ^ 2) ((n + 1) ^ 2)).filter Powerful).card

Is there some constant $c > 0$ such that $h(n) < (\log n)^{c + o(1)}$ and, for infinitely many $n$, $h(n) > (\log n)^{c - o(1)}$.

@[category research open, AMS 11] theorem declaration uses 'sorry'erdos_942 : answer(sorry) c > 0, (o : ), o =o[atTop] (1 : ) (∀ᶠ n in atTop, erdos_942.h n < (Real.log n) ^ (c + o n)) {n | erdos_942.h n > (Real.log n) ^ (c - o n)}.Infinite := True c > 0, o, o =o[atTop] 1 (∀ᶠ (n : ) in atTop, (erdos_942.h n) < Real.log n ^ (c + o n)) {n | (erdos_942.h n) > Real.log n ^ (c - o n)}.Infinite All goals completed! 🐙

It is not hard to prove that $\limsup h(n) = \infty$.

@[category textbook, AMS 11] theorem declaration uses 'sorry'erdos_942.variants.limsup : atTop.limsup (((fun (n : ) (n : ℕ∞)) erdos_942.h)) = := Filter.limsup ((fun n => n) h) atTop = All goals completed! 🐙

It is not hard to prove that the density $\delta_l$ of integers for which $h(n) = l$ exists and satisfies $$\sum_l \delta_l = 1$$.

@[category textbook, AMS 11] theorem declaration uses 'sorry'erdos_942.variants.density : δ : , l, {n | erdos_942.h n = l}.HasDensity (δ l) ∑' l, δ l = 1 := δ, (l : ), {n | h n = l}.HasDensity (δ l) ∑' (l : ), δ l = 1 All goals completed! 🐙 end Erdos942