Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #23 Sep 08 2022 08:45:43
%S 1,2,2,2,0,4,4,3,0,1,0,4,0,0,8,5,0,14,0,0,0,15,0,5,0,18,0,1,0,20,16,0,
%T 0,0,0,2,0,0,0,15,0,15,0,0,0,8,0,21,0,0,0,29,0,0,0,0,0,21,0,16,0,0,32,
%U 0,0,29,0,0,0,23,0,22,0,0,0,0,0,30,0,54,0,71,0,0,0,0,0,37,0,0,0,0,0,0,0,7,0
%N a(n) = lcm(1,2,3,...,n) mod (n+1).
%C If n+1 is not a power of a prime, then a(n) = 0.
%C If n+1 = p^m, p = prime, then p^(m-1) (= (n+1)/p) divides a(n), but p^m (= n+1) does not divide a(n).
%H Muniru A Asiru, <a href="/A158851/b158851.txt">Table of n, a(n) for n = 1..10000</a>
%F a(2^n-1) = 2^(n-1). - _Thomas Ordowski_, Sep 18 2018
%e a(6) = lcm(1,2,3,4,5,6) mod (6+1) = 60 mod 7 = 4.
%p a := proc (n) options operator, arrow: `mod`(lcm(seq(j, j = 1 .. n)), n+1) end proc: seq(a(n), n = 1 .. 100); # _Emeric Deutsch_, Apr 03 2009
%t Array[Mod[LCM @@ Range@ #, # + 1] &, 97] (* _Michael De Vlieger_, Mar 04 2018 *)
%o (PARI) a(n) = lcm(vector(n, k, k)) % (n+1); \\ _Michel Marcus_, Mar 06 2018
%o (GAP) List([1..100],n->Lcm([1..n]) mod (n+1)); # _Muniru A Asiru_, Mar 06 2018
%o (Magma) [Lcm([1..n]) mod (n+1): n in [1..100]]; // _Vincenzo Librandi_, Mar 07 2018
%Y Cf. A003418.
%K nonn
%O 1,2
%A _Leroy Quet_, Mar 28 2009
%E More terms from _Emeric Deutsch_, Apr 03 2009