OFFSET
1,1
COMMENTS
Inspired by Project Euler, Problem 659 (see link).
For every sequence b(m) = m^2 + n, m >= 1 and n fixed >= 1, there is a largest prime dividing any two successive terms of this sequence.
LINKS
Project Euler, Problem 659: Largest prime.
FORMULA
a(n) is the largest prime factor of 4n+1. - Charles R Greathouse IV, Nov 16 2022
3 <= a(n) <= A280818(n) <= 4n+1. Both bounds are sharp; a(n) = 3 if and only if n is of the form (9^n-1)/4, while a(n) = 4n+1 if and only if 4n+1 is prime. - Charles R Greathouse IV, Nov 16 2022
EXAMPLE
MATHEMATICA
a[n_] := FactorInteger[4*n + 1][[-1, 1]]; Array[a, 60] (* Amiram Eldar, Nov 16 2022 *)
PROG
(PARI) a(n)=my(f=factor(4*n+1)[, 1]); f[#f] \\ Charles R Greathouse IV, Nov 16 2022
(Python)
from sympy import primefactors
def A358440(n): return max(primefactors((n<<2)+1)) # Chai Wah Wu, Nov 16 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernard Schott, Nov 16 2022
STATUS
approved