OFFSET
1,2
COMMENTS
There is at most one prime p <= n such that n-th cyclotomic polynomial has a root mod p.
For prime n and every natural number k, a(n^k) = n.
If a(n) != 0, then a(n)|n.
a(n) is either 0 or A006530(n). See Corollary 23 of the Shevelev et al. link. - Robert Israel, Sep 07 2016
LINKS
Eric Chen and Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 (first 1500 terms from Chen)
V. Shevelev, G. Garcia-Pulgarin, J. M. Velasquez-Soto and J. H. Castillo, Overpseudoprimes, and Mersenne and Fermat Numbers as Primover Numbers, J. of Integer Sequences, Vol. 15 (2012), Art. 12.7.7.
MAPLE
N:= 1000: # to get a(1) to a(N)
f:= proc(n) local p, x, C, v;
C:= numtheory:-cyclotomic(n, x);
p:= max(numtheory:-factorset(n));
for v from 0 to p-1 do
if eval(C, x=v) mod p = 0 then return p fi
od:
0
end proc:
f(1):= 0:
seq(f(n), n=1..N); # Robert Israel, Sep 07 2016
MATHEMATICA
a[n_] := Module[{p, x, c, v}, c[x_] = Cyclotomic[n, x]; p = FactorInteger[ n][[-1, 1]]; For[v=0, v<p, v++, If[Mod[c[v], p] == 0, Return[p]]]; 0];
a[1] = 0;
Array[a, 100] (* Jean-François Alcover, Jul 27 2020, after Maple *)
PROG
(PARI) a(n) = forprime(p=2, n, if(#polrootsmod(polcyclo(n), p), return(p)))
(PARI) a(n)=my(P=polcyclo(n), f=factor(n)[, 1]); for(i=1, #f, if(#polrootsmod(P, f[i]), return(f[i]))); 0 \\ Charles R Greathouse IV, Apr 07 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric Chen, Apr 07 2015
STATUS
approved