Take the 2-minute tour ×

In my previous questions it is shown that $f(x)=x^2+ax+a$ , where $a\in\mathbf{Z^+}$\ $\left \{ 4 \right \}$ is irreducible and that gcd$(f(1),f(2),f(3).....)=1$

So, according to Bunyakovsky conjecture this polynomial produces infinitely many primes for all $a\in\mathbf{Z^+}$\ $\left \{ 4 \right \}$

My question : Can we find such coefficient $a$ that $x^2+ax+a$ is composite for all natural x ?

share|improve this question
Does a = 4 count or am I missing something? –  Sp3000 Nov 12 '11 at 6:21
@Sp3000,please read carefully question..$a$ is positive integer and $a \neq 4$ –  pedja Nov 12 '11 at 6:25
Hm, I should learn my notation properly, sorry about that. Well unless my code's wrong I can't find any $a < 500000$ and almost all $a$ with a long chain of composites are even. –  Sp3000 Nov 12 '11 at 6:36
@Sp3000,what programming language you use...? May you post your code as answer ? –  pedja Nov 12 '11 at 6:40
I know no counterexample. As far as I know, no one does, or at least no one did a day or two ago. The news would spread quickly! –  André Nicolas Nov 12 '11 at 7:02

1 Answer 1

up vote 1 down vote accepted

There is a good reason for the Bunyakovsky conjecture to be open, it is very hard to find a counterexample and even for polynomials that seem to be one, there are cases where you have to wait for very high $x$ until you encounter a prime. See for exampe the one given at wolfram: $x^{12}+488669$ it produces the first prime for $x=616980$, the first prime is therefore bigger than $10^{69}$.

Using GMP you can try if there might be a possible counterexample in your sequence:

#include <iostream>
#include <gmpxx.h>
using namespace std;

int Rabin_Miller(mpz_class n) { /* given an integer n >= 3 returns 0 composite, 1 probably prime */
    return mpz_probab_prime_p(n.get_mpz_t(), 10);

#define MAX_A 1000000
#define MAX_X 1000

int main() {
    mpz_class a;
    for(a = 4; a < MAX_A; ++a)
        for(unsigned int x = 1; x <= MAX_X; ++x)
            if(Rabin_Miller(x*x+a*x+a) > 0)
                x = MAX_X+1;    
            if(x == MAX_X)
                cout << "For a = " << a << " the first " << MAX_X << " values are composite!" << endl;

I used it to see (takes over 10 minutes to compute) that if there is a counterexample then $a>10.000.000$ (the above source is for 1 million, also note gmp uses the rabin miller test which only tells you if a number is probably prime but for prime numbers that are small like the ones in this program, it works correct [I think no example where it fails is known]).

share|improve this answer

Your Answer


