OFFSET
1,2
COMMENTS
If n is not composite then a(n) = n.
EXAMPLE
a(6) = 12 since lcm{ 1,2,3,4,6 } = 12.
MAPLE
A066574 := n -> ilcm(op(select(k->igcd(n, k)<>1, [$1..n]))); seq(A066574(i), i=1..42); # Peter Luschny, Jun 25 2011
MATHEMATICA
f[n_] := Block[{a = 1, k = 2}, While[k < n + 1, If[ GCD[k, n] > 1, a = LCM[a, k]]; k++ ]; Return[a]]; Table[ f[n], {n, 1, 45} ]
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Dec 19 2001
EXTENSIONS
More terms from Robert G. Wilson v, Dec 26 2001
STATUS
approved