This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A158851 #23 Sep 08 2022 08:45:43 %S A158851 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 A158851 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 A158851 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 A158851 a(n) = lcm(1,2,3,...,n) mod (n+1). %C A158851 If n+1 is not a power of a prime, then a(n) = 0. %C A158851 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 A158851 Muniru A Asiru, <a href="/A158851/b158851.txt">Table of n, a(n) for n = 1..10000</a> %F A158851 a(2^n-1) = 2^(n-1). - _Thomas Ordowski_, Sep 18 2018 %e A158851 a(6) = lcm(1,2,3,4,5,6) mod (6+1) = 60 mod 7 = 4. %p A158851 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 A158851 Array[Mod[LCM @@ Range@ #, # + 1] &, 97] (* _Michael De Vlieger_, Mar 04 2018 *) %o A158851 (PARI) a(n) = lcm(vector(n, k, k)) % (n+1); \\ _Michel Marcus_, Mar 06 2018 %o A158851 (GAP) List([1..100],n->Lcm([1..n]) mod (n+1)); # _Muniru A Asiru_, Mar 06 2018 %o A158851 (Magma) [Lcm([1..n]) mod (n+1): n in [1..100]]; // _Vincenzo Librandi_, Mar 07 2018 %Y A158851 Cf. A003418. %K A158851 nonn %O A158851 1,2 %A A158851 _Leroy Quet_, Mar 28 2009 %E A158851 More terms from _Emeric Deutsch_, Apr 03 2009