OFFSET
3,1
COMMENTS
LINKS
Peter J. C. Moses and Chai Wah Wu, Table of n, a(n) for n = 3..10002 First 1000 terms from Peter J. C. Moses.
FORMULA
a(n) >= A247190(n).
MATHEMATICA
Table[ans={};
NestWhile[#+1&, 2, (AppendTo[ans, Mod[#!, Prime[n]]]; (Length[ans]<Prime[n]-1)&&(Max[Last[Transpose[Tally[ans]]]]==1))&]-1, {n, 3, 50}] (* Peter J. C. Moses, Nov 25 2014 *)
PROG
(Python)
from sympy import prime
def A245085(n):
....p, f, fv = prime(n), 1, {}
....for i in range(2, p):
........f = (f*i) % p
........if f in fv:
............return i-1
........else:
............fv[f] = i
....return p-1 # Chai Wah Wu, Dec 15 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Nov 25 2014
EXTENSIONS
More terms from Peter J. C. Moses, Nov 25 2014
STATUS
approved