OFFSET
1,1
COMMENTS
Note that a(n)=1 iff n is a power of a prime.
Because every cyclotomic polynomial is irreducible, it is expected that a(n) exists for all n.
Note that if p=Phi(n,k) is prime and n>1, then p==1 (mod k). - Corrected by Robert Israel, Apr 22 2019
LINKS
Jinyuan Wang, Table of n, a(n) for n = 1..5000 (terms 1..1000 from T. D. Noe)
FORMULA
Phi(n, a(n)) = A307687(n). - Robert Israel, Apr 22 2019
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 k fi od
end proc:
map(f, [$1..200]); # Robert Israel, Apr 22 2019
MATHEMATICA
Table[k=1; While[ !PrimeQ[Cyclotomic[n, k]], k++ ]; k, {n, 100}]
PROG
(PARI) a(n) = my(k=1); while (!isprime(polcyclo(n, k)), k++); k; \\ Michel Marcus, Apr 22 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Mar 28 2006
STATUS
approved