/- 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 269

Reference: erdosproblems.com/269

namespace Erdos269

A positive integer $n$ has all its prime factors in the set $P$. By convention, $1$ satisfies this for any $P$ as it has no prime divisors.

def HasPrimeFactorsIn (P : Set ) (n : ) : Prop := n > 0 p, p.Prime p n p P

The infinite, strictly increasing sequence ${a_0, a_1, \dots}$ of integers whose prime factors all belong to $P$.

noncomputable def a (P : Set ) : := Nat.nth <| HasPrimeFactorsIn P

The $n$-th partial least common multiple, $[a_0, \dots, a_{n-1}]$, which is the LCM of the first $n$ integers in the sequence.

noncomputable def partialLcm (P : Set ) (n : ) : := -- We take the LCM of `{a P 0, ..., a P n}`. (Finset.range n).lcm (a P)

The sum $\sum_{n=1}^\infty \frac{1}{[a_0,\ldots,a_{n - 1}]}$.

noncomputable def series (P : Set ) : := ∑' n, (1 : ) / (partialLcm P n)

Let $P$ be a finite set of primes with $|P| \ge 2$ and let ${a_1 < a_2 < \dots}$ be the set of positive integers whose prime factors are all in $P$. Is the sum $$ \sum_{n=1}^\infty \frac{1}{[a_1,\ldots,a_n]} $$ rational?

@[category research open, AMS 11] theorem declaration uses 'sorry'erdos_269.variants.rational : answer(sorry) ∀ᵉ (P : Finset ) (h : p P, p.Prime) (h_card : P.card 2), (q : ), q = (series (P : Set )) := True (P : Finset ), (∀ p P, Nat.Prime p) P.card 2 q, q = series P All goals completed! 🐙

Let $P$ be a finite set of primes with $|P| \ge 2$ and let ${a_1 < a_2 < \dots}$ be the set of positive integers whose prime factors are all in $P$. Is the sum $$ \sum_{n=1}^\infty \frac{1}{[a_1,\ldots,a_n]} $$ irrational?

@[category research open, AMS 11] theorem declaration uses 'sorry'erdos_269.variants.irrational : answer(sorry) ∀ᵉ (P : Finset ) (h : p P, p.Prime) (h_card : P.card 2), Irrational (series (P : Set )) := True (P : Finset ), (∀ p P, Nat.Prime p) P.card 2 Irrational (series P) All goals completed! 🐙

This theorem addresses the case where the set of primes $P$ is infinite. In this case the sum is irrational.

@[category research solved, AMS 11] theorem declaration uses 'sorry'erdos_269.variants.infinite (P : Set ) (h : p P, p.Prime) (h_inf : P.Infinite) : Irrational (series P) := P:Set h: p P, Nat.Prime ph_inf:P.InfiniteIrrational (series P) All goals completed! 🐙 end Erdos269