login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A158851 a(n) = lcm(1,2,3,...,n) mod (n+1). 2
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
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
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
Cf. A003418.
Sequence in context: A155123 A125938 A215461 * A151930 A356907 A084203
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 28 2009
EXTENSIONS
More terms from Emeric Deutsch, Apr 03 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 23 09:02 EST 2024. Contains 370276 sequences. (Running on oeis4.)