- I failed to solve any of David's exercises... but I have done some shallow verification, n<2.5*10^5, for yet another test:

{tst(n,x)=kronecker(x^2-4,n)==-1&&

gcd(x+1,n)==1&&

Mod(Mod(1,n)*(L+x+1),(L^2-x*L+1)*(L^2+x*L+1))^(n)==-L^3+(x^2-2)*L+x+1;}

It looks as though when "gcd(x+1,n)==1" is needed then n==5 (mod 6), and any of gcd(x-1,n), gcd(x,n), gcd(x^2-2,n) and gcd(x^3-3,n) greater than 1 is also a prime equal to 5 (mod 6) when "gcd(x+1,n)==1" is required,

Paul -- subject to gcd wriggles > --- In primenumbers@yahoogroups.com, "paulunderwooduk" wrote:

n=1934765;x=1219266 has gcd(x-1,n)==265. So 2) might be "1 or a product of primes each congruent 5 (mod 6)", but as greater n get tested I guess this rule will break too...

>

>

> > > >

> > > > {tst(n,x)=kronecker(x^2-4,n)==-1&&

> > > > gcd(x+1,n)==1&&

> > > > Mod(Mod(1,n)*(L+x+1),(L^2-x*L+1)*(L^2+x*L+1))^(n)==-L^3+(x^2-2)*L+x+1;}

> > > >

>

> Please accept my apology for my previous statements about this composite test. I am actually running tests for:

> (mod n, L^2-x*L+1) and (mod n, L^2+x*L+1); not the product of these. If the main test is passed then gcds with n of x-1, x, x+1, x^2-2 and x^2-3 are logged.

>

> Now for some speculation about the results so far:

>

> 1) taking the mod with "the product" implies gcd(x,n)==1.

>

> 2) for "the product", gcds of n with x-1, x^2-2 and x^2-3 are either 1 or a prime congruent to 5 (mod 6) where "gcd(x+1,n)" is logged.

>

> 3) logged gcd(x+1,n) is not 1

I have verified all n<1.95*10^6

>

> 4) the logged n are all congruent to 5 (mod 6).

>

Paul