login
Least prime p such that the polynomial x^n - x^(n-1) -...- 1 (mod p) has n distinct zeros.
1

%I #10 Apr 15 2013 09:05:35

%S 2,11,47,137,691,25621,59233,2424511,2607383,78043403

%N Least prime p such that the polynomial x^n - x^(n-1) -...- 1 (mod p) has n distinct zeros.

%C This is the characteristic polynomial of the n-step Fibonacci and Lucas sequences. For composite p, the polynomial can have more than n zeros! See A211672.

%e For p = 11, x^2-x-1 = (x+3)(x+7) (mod p).

%e For p = 47, x^3-x^2-x-1 = (x+21)(x+30)(x+42) (mod p).

%e For p = 137, x^4-x^3-x^2-x-1 = (x+12)(x+79)(x+85)(x+97) (mod p).

%t Clear[x]; Table[poly = x^n - Sum[x^k, {k, 0, n - 1}]; k = 1; While[p = Prime[k]; cnt = 0; Do[If[Mod[poly, p] == 0, cnt++], {x, 0, p - 1}]; cnt < n, k++]; p, {n, 5}]

%o (PARI)

%o N=10^9; default(primelimit,N);

%o a(n)={my(P=x^n-sum(k=0, n-1, x^k) ); forprime(p=2,N, if( #polrootsmod(P,p)==n, return(p) ) );}

%o /* _Joerg Arndt_, Apr 15 2013 */

%Y Cf. A045468 (n=2), A106279 (n=3), A106280 (n=4), A106281 (n=5).

%Y Cf. A211672 (for composite p).

%K nonn,hard,more

%O 1,1

%A _T. D. Noe_, Apr 18 2012

%E Term a(8) - a(10) from _Joerg Arndt_, Apr 15 2013