OFFSET
2,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 2..1000 (first 99 terms from Luke March)
MAPLE
a:= n-> ilcm(seq(k, k=1..n))/n/(n-1): seq(a(n), n=2..37); # Emeric Deutsch, Jun 13 2005
MATHEMATICA
Table[LCM@@Range[n]/(n(n-1)), {n, 2, 40}] (* Harvey P. Dale, Jan 14 2011 *)
PROG
(Python)
from math import gcd
def lcm(a, b):
return (a * b) // gcd(a, b)
def f(lim):
l = 1
for n in range(2, lim + 1):
l = lcm(n, l)
print(n, l // (n * (n - 1)))
f(100) # Luke March, Jul 23 2014
(PARI) a(n) = lcm(vector(n, i, i))/(n*(n-1)); \\ Michel Marcus, Jul 25 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Nov 12 2004
EXTENSIONS
More terms from Emeric Deutsch, Jun 13 2005
STATUS
approved