OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..426
FORMULA
EXAMPLE
a(10)=11 because the 10th cyclotomic polynomial is Phi(10,x) = x^4 - x^3 + x^2 - x + 1, and Phi(10,2)=11 is prime but Phi(10,1)=1 is not prime.
MAPLE
f:= proc(n) local C, x, k;
C:= unapply(numtheory:-cyclotomic(n, x), x);
for k from 1 do if isprime(C(k)) then return C(k) fi od
end proc:
map(f, [$1..100]);
MATHEMATICA
a[n_] := Module[{c, k}, c[x_] = Cyclotomic[n, x]; For[k = 1, True, k++, If[PrimeQ[c[k]], Return[c[k]]]]]; Array[a, 100] (* Jean-François Alcover, Apr 29 2019 *)
PROG
(PARI) a(n) = my(k=1, p); while (!isprime(p=polcyclo(n, k)), k++); p; \\ Michel Marcus, Apr 22 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Apr 22 2019
STATUS
approved