OFFSET
1,3
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(n) local p;
p:= ithprime(n);
padic:-ordp((p-1)!+1, p)
end proc:
map(f, [$1..200]); # Robert Israel, Apr 29 2021
MATHEMATICA
Table[With[{p = Prime@ n}, SelectFirst[Reverse@ Range@ 10, Mod[(p - 1)!, #] == # - 1 &[p^#] &]], {n, 105}] (* Michael De Vlieger, Aug 20 2017 *)
PROG
(PARI) a(n) = my(p=prime(n), k=1); while(Mod((p-1)!, p^k)==-1, k++); k-1
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Mar 01 2017
EXTENSIONS
More terms from Antti Karttunen, Aug 20 2017
STATUS
approved