1,3

T. D. Noe, Table of n, a(n) for n = 1..10000

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.

(Ruby) (1..100).map{|n|(0..n).max_by{|x|[(1..x).inject(1, :*)%n, -x]}}

Cf. A062170.

Sequence in context: A123674 A238745 A092607 * A057939 A163371 A061338

Adjacent sequences: A221858 A221859 A221860 * A221862 A221863 A221864

nonn

Aaron Weiner, Apr 10 2013

approved