OFFSET
1,2
COMMENTS
If n+1 is not a power of a prime, then a(n) = 0.
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).
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..10000
FORMULA
a(2^n-1) = 2^(n-1). - Thomas Ordowski, Sep 18 2018
EXAMPLE
a(6) = lcm(1,2,3,4,5,6) mod (6+1) = 60 mod 7 = 4.
MAPLE
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
MATHEMATICA
Array[Mod[LCM @@ Range@ #, # + 1] &, 97] (* Michael De Vlieger, Mar 04 2018 *)
PROG
(PARI) a(n) = lcm(vector(n, k, k)) % (n+1); \\ Michel Marcus, Mar 06 2018
(GAP) List([1..100], n->Lcm([1..n]) mod (n+1)); # Muniru A Asiru, Mar 06 2018
(Magma) [Lcm([1..n]) mod (n+1): n in [1..100]]; // Vincenzo Librandi, Mar 07 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 28 2009
EXTENSIONS
More terms from Emeric Deutsch, Apr 03 2009
STATUS
approved