OFFSET
1,3
EXAMPLE
a(7) = 3 because k^7 ==0, 1, 2, 3, 4, 5, 6 (mod 7) => 5 is the greatest prime.
MAPLE
for n from 1 to 100 do: W:={}:for k from 0 to n-1 do:z:= irem(k^n, n): if type(z, prime)=true then W:=W union {z}:else fi:od: x:=nops(W): if x<>0 then printf(`%d, `, W[x]): else printf(`%d, `, 0):fi: od:
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Dec 09 2011
STATUS
approved