OFFSET
1,3
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=11, we see that the factorial of 5 (120), modulo 11 is 10, which is the highest possible value, so the 11th term is 5.
PROG
(Ruby) (1..100).map{|n|(0..n).max_by{|x|[(1..x).inject(1, :*)%n, -x]}}
CROSSREFS
KEYWORD
nonn
AUTHOR
Aaron Weiner, Apr 10 2013
STATUS
approved