OFFSET
1,2
EXAMPLE
MATHEMATICA
t = Select[Prime@ Range@ 120, AnyTrue[Range@ #, Function[m, Divisible[m! + 1, #^2]]] &]; Table[k = 1; While[Mod[(t[[n]] - k)!, t[[n]]^2] != t[[n]]^2 - 1, k++]; k, {n, 7}] (* Michael De Vlieger, Nov 10 2015, Version 10 *)
PROG
(PARI) forprime(p=1, , for(k=1, p-1, if(Mod((p-k)!, p^2)==-1, print1(k, ", "); break({1}))))
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Felix Fröhlich, Nov 08 2015
STATUS
approved