OFFSET

1,3

LINKS

Peter Kagey, Table of n, a(n) for n = 1..10000

EXAMPLE

a(1) = 1 by definition.

a(2) = 1, because 2 == a(1) (mod 1);

a(3) = 2, because 3 == a(1) (mod 1), and 3 == a(2) (mod 2): 1 * 2 = 2;

a(4) = 1, because 4 == a(1) (mod 1);

a(5) = 24, because 5 == k (mod k) for 0 < k < 5: 1 * 2 * 3 * 4 = 24.

MATHEMATICA

a = {1}; Do[AppendTo[a, Times @@ Flatten@ Position[MapIndexed[Mod[n, First@ #2] == Mod[#1, First@ #2] &, a], True]], {n, 2, 53}]; a (* Michael De Vlieger, Apr 09 2016 *)

CROSSREFS

KEYWORD

nonn

AUTHOR

Peter Kagey, Apr 09 2016

STATUS

approved