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

$a(n)$ = the number of values of $k <= 10^n$ such that $\sqrt{k(k+1)(k+2)(k+3)+1}$ is prime

Since $\sqrt{k(k+1)(k+2)(k+3)+1} = k^2 + 3k + 1$, $a(n) = #{k \in \mathbb{N} \mid 1 \le k \le 10^n \land (k^2 + 3k + 1) \text{ is prime} }.$

References:

namespace OeisA115366open Filter Real Topology

The primary defining sequence a. $a(n) = #{k \in \mathbb{N} \mid 1 \le k \le 10^n \land (k^2 + 3k + 1) \text{ is prime} }.$

def a (n : ) : := Finset.card <| Finset.filter (fun k : => Nat.Prime (k ^ 2 + 3 * k + 1)) (Finset.Icc 1 (10 ^ n))@[category test, AMS 11] theorem a_0 : a 0 = 1 := a 0 = 1 All goals completed! 🐙@[category test, AMS 11] theorem a_1 : a 1 = 9 := a 1 = 9 All goals completed! 🐙@[category test, AMS 11] theorem a_2 : a 2 = 50 := a 2 = 50 All goals completed! 🐙@[category test, AMS 11] theorem a_3 : a 3 = 313 := a 3 = 313 All goals completed! 🐙

Conjecture: $a(n)/A006880(n) \rightarrow 1.77...$ where A006880(n) is the number of primes $\le 10^n$.

@[category research open, AMS 11] theorem conjecture : L : , Tendsto (fun n : => (a n : ) / (Nat.primeCounting' (10 ^ n) : )) atTop (nhds L) 1.77 L L 1.78 := L, Tendsto (fun n (a n) / (10 ^ n).primeCounting') atTop (𝓝 L) 1.77 L L 1.78 All goals completed! 🐙end OeisA115366