OFFSET
3,1
COMMENTS
Conjecture 1: Every term of this sequence is either a prime or 1.
Conjecture 2: The sequence contains all prime numbers which end with a 1 or 9.
Conjecture 3: Except for 5, the primes all appear exactly twice.
Conjecture: The sequence of record values is A028877. - Bill McEachen, May 20 2024
Conjectures 1 and 2 were proved by an autonomous AI agent, see the Lean file. The proof uses the fact that the continued-fraction denominator A363347(n) reduces to |n^2+2n-4| divided by its gcd with the numerator. Since p is congruent (+/-)1 (mod 10) makes 5 a quadratic residue, picking n=x-1 with x^2 congruent 5 forces p to divide n^2+2n-4; divisibility lemmas show the gcd cancels only the cofactor, leaving exactly p. - Ralf Stephan, Jun 09 2026
LINKS
Mohammed Bouras, The Distribution Of Prime Numbers And Continued Fractions, (ppt) (2022).
Google Deepmind, AlphaProof Nexus: A363347 Lean file.
FORMULA
a(n) = gpf(n^2 + 2*n - 4) if gpf(n^2 + 2*n - 4) > n, otherwise a(n) = 1 (where gpf(n) denotes the greatest prime factor of n).
If n != m and a(n) = a(m) != 1, then we have:
a(n) = n + m + 2.
a(n) = gcd(n^2 + 2*n - 4, m^2 + 2*m - 4).
EXAMPLE
For n=3, 1/(2 - 3/(-4)) = 4/11, so a(3) = 11.
For n=4, 1/(2 - 3/(3 - 4/(-4))) = 4/5, so a(4) = 5.
For n=5, 1/(2 - 3/(3 - 4/(4 -5/(-4)))) = 47/31, so a(5) = 31.
a(3) = a(6) = 3 + 6 + 2 = 11.
a(5) = a(24) = 5 + 24 + 2 = 31.
a(7) = a(50) = 7 + 50 + 2 = 59.
CROSSREFS
KEYWORD
nonn
AUTHOR
Mohammed Bouras, May 28 2023
STATUS
approved
