A089619 a(n) = greatest prime factor of n^2 + (n+1)^2 for n >= 1.
5, 13, 5, 41, 61, 17, 113, 29, 181, 17, 53, 313, 73, 421, 37, 109, 613, 137, 761, 29, 37, 1013, 17, 1201, 1301, 281, 89, 13, 1741, 1861, 397, 2113, 449, 2381, 2521, 41, 97, 593, 3121, 193, 53, 3613, 757, 233, 101, 173, 4513, 941, 29, 5101, 1061, 149, 229, 457, 101
Offset: 1
Examples
2*7^2 - 2*7 + 1 = 85 = 5*17, so a(7) = 17.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
a[n_] := FactorInteger[n^2 + (n+1)^2][[-1, 1]]; Array[a, 60] (* Amiram Eldar, Oct 29 2024 *)
-
PARI
xnpym1n(m) = { for(n=1,m, y = n^2+(n+1)^2; f = factor(y); l = length(component(f,1)); v = component(component(f,1),l); print1(v","); ) }
Extensions
Edited by Ray Chandler, Jan 03 2004
Offset corrected by Georg Fischer, May 27 2024