|
|
A253236
|
|
The unique prime p <= n such that n-th cyclotomic polynomial has a root mod p, or 0 if no such p exists.
|
|
2
|
|
|
0, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 0, 13, 7, 0, 2, 17, 3, 19, 5, 7, 11, 23, 0, 5, 13, 3, 0, 29, 0, 31, 2, 0, 17, 0, 0, 37, 19, 13, 0, 41, 7, 43, 0, 0, 23, 47, 0, 7, 5, 0, 13, 53, 3, 11, 0, 19, 29, 59, 0, 61, 31, 0, 2, 0, 0, 67, 17, 0, 0, 71, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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:
|
|
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;
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|