A257874 Numbers n such that the largest prime divisor of n^4 + n^2 + 1 is equal to the largest prime divisor of (n+1)^4 + (n+1)^2 + 1.
3, 6, 8, 10, 12, 15, 17, 21, 24, 27, 31, 33, 38, 41, 43, 48, 50, 52, 54, 57, 59, 62, 66, 69, 71, 73, 75, 78, 80, 82, 85, 90, 93, 95, 97, 99, 101, 103, 105, 111, 115, 117, 119, 124, 127, 131, 133, 136, 138, 141, 143, 145, 147, 150, 153, 155, 157, 162, 164, 168
Offset: 1
Keywords
Examples
3 is in the sequence because 3^4+3^2+1 = 91 = 13*7 and 4^4+4^2+1 = 273 = 13*7*3, so 13 is the greatest prime factor of both expressions.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Maple
with(numtheory):for n from 1 to 400 do:x1:=n^4 + n^2 + 1:x2:=(n+1)^4 + (n+1)^2+1:y1:=factorset(x1):n1:=nops(y1):y2:=factorset(x2):n2:=nops(y2):if y1[n1]=y2[n2] then printf(`%d, `,n):else fi:od:
-
Mathematica
fQ[n_]:=Last[FactorInteger[n^4+n^2+1]][[1]]==Last[FactorInteger[(n+1)^4+(n+1)^2+1]][[1]];Select[Range[168],fQ[#]&] (* Ivan N. Ianakiev, Jun 11 2015 *) SequencePosition[Table[FactorInteger[n^4+n^2+1][[-1,1]],{n,200}],{x_,x_}][[;;,1]] (* Harvey P. Dale, Nov 06 2024 *)
-
PARI
gpf(n)=if(n<4, return(n)); my(f=factor(n)[,1]); f[#f] is(n)=my(a=n^4+n^2+1, b=(n+1)^4 +(n+1)^2+1, g=gcd(a,b), p=gpf(g)); g>1 && p>=gpf(a/g) && p>=gpf(b/g) \\ Charles R Greathouse IV, May 11 2015
Comments