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

Conjectures associated with A100474

$a(1) = 1$; $a(n)$ is the smallest integer such that $a(n) + a(n-1)$ has the first $n$ distinct prime factors not used before in this construction.

References:

namespace OeisA100474

The $n$-th triangular number.

def triangular (n : ) : := n * (n + 1) / 2

The primary defining sequence a.

noncomputable def a : | 0 => 0 | 1 => 1 | n + 2 => (Finset.Ico (triangular (n + 1) - 1) (triangular (n + 2) - 1)).prod (Nat.nth Nat.Prime) - a (n + 1)h1:Nat.Prime 13Nat.nth Nat.Prime 5 = 13 All goals completed! 🐙h1:Nat.Prime 17Nat.nth Nat.Prime 6 = 17 All goals completed! 🐙h1:Nat.Prime 19Nat.nth Nat.Prime 7 = 19 All goals completed! 🐙h1:Nat.Prime 23Nat.nth Nat.Prime 8 = 23 All goals completed! 🐙h1:Nat.Prime 29Nat.nth Nat.Prime 9 = 29 All goals completed! 🐙h1:Nat.Prime 31Nat.nth Nat.Prime 10 = 31 All goals completed! 🐙h1:Nat.Prime 37Nat.nth Nat.Prime 11 = 37 All goals completed! 🐙h1:Nat.Prime 41Nat.nth Nat.Prime 12 = 41 All goals completed! 🐙h1:Nat.Prime 43Nat.nth Nat.Prime 13 = 43 All goals completed! 🐙

Value of the sequence a at 1.

@[category test, AMS 11] theorem a_1 : a 1 = 1 := a 1 = 1 All goals completed! 🐙

Value of the sequence a at 2.

2 * 3 - a 1 = 5 All goals completed! 🐙

Value of the sequence a at 3.

5 * 7 * 11 - 5 = 380 All goals completed! 🐙

Value of the sequence a at 4.

13 * 17 * 19 * 23 - 380 = 96197 All goals completed! 🐙

Value of the sequence a at 5.

29 * 31 * 37 * 41 * 43 - 96197 = 58546472 All goals completed! 🐙

After $a(2) = 5$, is there another prime?

@[category research open, AMS 11] theorem conjecture : answer(sorry) n > 2, (a n).Prime := True n > 2, Nat.Prime (a n) All goals completed! 🐙

What is the next semiprime in the sequence after $a(11)$?

@[category research solved, AMS 11, formal_proof using lean4 at "https://github.com/KitaKen1/oeis-a100474-next-semiprime/blob/d7781751918e63fd1268b15525bf9554c92fdd4d/lean/OeisA100474NextSemiprimeFC.lean#L1285-L1288"] theorem next_semiprime : answer(3852669607062814427999374038085094563026983841699038416757537720951140990693348082633155462564082456461927363575765861495986901576629) = a (sInf {n : | 11 < n (a n).IsSemiprime}) := 3852669607062814427999374038085094563026983841699038416757537720951140990693348082633155462564082456461927363575765861495986901576629 = a (sInf {n | 11 < n (a n).IsSemiprime}) All goals completed! 🐙end OeisA100474