cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, May 11 2015

Keywords

Comments

The sequence is infinite. Proof:
Let p(n) denote the largest prime divisor of n^4 + n^2 + 1 and let q(n) denote the largest prime divisor of n^2 + n + 1. Then p(n) = q(n^2), and from
n^4 + n^2 + 1 = (n^2+1)^2 - n^2 = (n^2-n+1)(n^2+n+1)= ((n-1)^2 + (n-1)+1)(n^2+n+1) it follows that p(n) = max{q(n),q(n-1)} for n>=2.
Keeping in mind that n^2-n+1 is odd, we have
gcd(n^2+n+1,n^2-n+1) = gcd(2n,n^2-n+1)= gcd(n,n^2-n+1)= 1.
Therefore q(n) is different from q(n-1).
To prove the result, it suffices to show that the set
S = {n in Z | n>=2 and q(n) > q(n-1) and q(n) > q(n+1)}
is infinite, since for each n in S one has
p(n) = max{q(n),q(n-1)} = q(n) = max{q(n),q(n+1)} = p(n+1).
Suppose on the contrary that S is finite. Since q(2) = 7 < 13 = q(3) and q(3) = 13 > 7 = q(4), the set S is nonempty. Since it is finite, we can consider its largest element, say m.
Note that it is impossible that q(m)>q(m+1)>q(m+2)>... because all these numbers are positive integers, so there exists a number k>=m such that q(k)= k+1 such that q(l)>q(l+1). By the minimality of l, we have q(l-1)= k + 1 > k >= m, this contradicts the maximality of m, and hence S is indeed infinite.

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.
		

Crossrefs

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