login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A358440
a(n) is the largest prime that divides any two successive terms of the sequence b(m) = m^2 + n with m >= 1.
1
5, 3, 13, 17, 7, 5, 29, 11, 37, 41, 5, 7, 53, 19, 61, 13, 23, 73, 11, 3, 17, 89, 31, 97, 101, 7, 109, 113, 13, 11, 5, 43, 19, 137, 47, 29, 149, 17, 157, 23, 11, 13, 173, 59, 181, 37, 7, 193, 197, 67, 41, 19, 71, 31, 17, 5, 229, 233, 79, 241
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.
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
With A117950 (m^2+3, m>=1), the two successive terms A117950(6) = 39 and A117950(7) = 52 are both multiples of 13; the second such pair is A117950(19) = 364 and A117950(20) = 403, ... As 13 is the largest prime that divides two any successive integers of A117950, a(3) = 13.
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
Sequence in context: A206435 A080797 A376975 * A280818 A085910 A093544
KEYWORD
nonn
AUTHOR
Bernard Schott, Nov 16 2022
STATUS
approved