5
$\begingroup$

If $x \not\equiv1 \pmod 3$, when is $x^2 + x + 1$ not a prime?

I am especially interested in an example that is not prime or even better, an explanation why the frequency of such primes goes down as $x$ gets larger.

  • 0
    Why would the frequency stay the same? I don't see why this should be any different then any other increasing expression. Primes become less frequent as there are more factors that must be avoided if a number is to be prime.2017-02-24
  • 0
    There are fewer primes out there, it's not terribly surprising the number represented by a given quadratic form should go down. Is there a context/reason you think this is surprising?2017-02-24
  • 0
    x=5 is a counterexample2017-02-24
  • 0
    $x^2 + x + 1 =( x^3 - 1)/(x-1)$ so x= 2 you have x^2 + x + 1 = 8. That's pretty ... low.2017-02-24
  • 0
    For x = -1 mod 3 x=2 is a counter example, x=5, x = 11 are counter examples (while x = 8 is prime). For x =3k, x=6 is not prime. these seems, to be blunt... pointless.2017-02-24
  • 0
    @fleablood excaept that $4+2+1=7$2017-02-24
  • 1
    "@fleablood excaept that 4+2+1=7" Well, it is if you use *conventional* math... *sheesh*.2017-02-24
  • 0
    what math do you use?2017-02-24
  • 1
    @kotomord (and fleablood), what are you saying about $25+5+1$?2017-02-24
  • 0
    @BarryCipra, yes2017-02-24
  • 0
    @kotomord, what do you mean by "yes"?2017-02-24

4 Answers 4

4

Let $f(x)=x^2+x+1$.

  • You see that $f(2)=7$. This implies that $f(n)$ is divisible by $7$ whenever $n\equiv2\pmod7$. This is basic congruence algebra - leaving the proof as an exercise. Anyway, we know that $f(9)=91$ and $f(16)=273$ et cetera cannot be primes, because they are divisible by seven.
  • Similarly $f(3)=13$ implies that $f(n)$ is divisible by $13$ whenever $n\equiv3\pmod{13}$, and $f(n)$ is divisible by $31$ whenever $n\equiv5\pmod{31}$.

We can continue the above list. It is just showcasing the mechanism that prevents any polynomial with integer coefficients from producing only primes as its values.


A different way of looking at this is via quadratic reciprocity. The discriminant of $f(x)$ is $D=-3$. The law of quadratic reciprocity reveals that $-3$ is a quadratic residue modulo a prime $p>3$, iff $p\equiv1\pmod3$. So we can find an integer $n$ in the range $00$, and hence not a prime.

  • 0
    Thanks very much! These are the details that I was looking for! :-)2017-02-24
1

if $$x\equiv 0\mod 3$$ we can set $$x=3m$$ plugging this in your term we get $$9m^2+3m+1$$ and this is not a prime for $$m=6$$, we get $$343=7^3$$ if $$x\equiv 2\mod 3$$ we can set $$x=3m+2$$ and our term is $$9m^2+15m+7$$ and this is surely not prime if $$m=7$$

0

As you pass the prime squares as in the result values, more and more primes can be involved in any possible composite result.

The first two composite values of $91 = 7 \cdot 13$ and $133 = 7 \cdot 19$ show that when $x \equiv \{2, 4 \} \bmod 7$ you will get a result divisible by $7$.

0

Suppose $x^2 + x + 1$ is a prime $p$ other than $p = 3$. Then $4p - 3$ is a square; e.g., for $p = 31$, $4p - 3 = 124 - 3 = (11)(11)$. Conversely if $4p - 3$ is a square for $p$ a prime, there is a divisor $x$ of $p - 1$ such that $p = x^2 + x + 1$. The complement of $x$, $\frac{p - 1}{x}$, is $x + 1$. With $p = 31$, $x = 5$ and $\frac{p - 1}{x} = 6$. Notice that since $x(x + 1) = p - 1$, $x$ cannot be congruent to 1 mod 3, unless $p = 3$. Thus, an answer is that $x^2 + x + 1$ is not a prime exactly when $4(x^2 + x + 1) - 3$ is not a square.

  • 0
    I couldn't follow. Isn't $4(x^2+x+1)-3=(2x+1)^2$ always a square?2017-02-26
  • 0
    @Jyrki Lahtonen I've got to admit that. Sorry. What I should say is that if p is a prime for which 4p-3 is a square, then there is a divisor x of p-1 whose complement (in the lattice of divisors of p-1) is x+1. As you say it is obvious that if p is a prime with a divisor x of p-1 whose complement is is x+1 then 4p-3 is a square.2017-02-28