%I #23 May 20 2020 07:07:38
%S 1,2,1,6,3,2,12,12,4,6,60,60,20,30,12,60,60,60,30,12,60,420,420,420,
%T 210,84,420,60,840,840,840,840,168,840,120,420,2520,2520,2520,2520,
%U 504,2520,360,1260,840,2520,2520,2520,2520,2520,2520,360,1260,840,2520,27720
%N The k-th term of the n-th row of the following triangle is the least common multiple of all numbers from 1 to n except k. Sequence contains the triangle by rows.
%C The leading diagonal and the first column are given by A003418 with a suitable offset 0 or 1.
%F T(n,k) = A003418(n)/p if k = p^m for some m and n < 2*p^m and A003418(n) otherwise. - _Charlie Neder_, Jun 13 2019
%e Triangle begins:
%e 1,
%e 2, 1,
%e 6, 3, 2,
%e 12, 12, 4, 6,
%e 60, 60, 20, 30, 12,
%e 60, 60, 60, 30, 12, 60;
%p A094307 := proc(n,k) local a,i ; if n = 1 then RETURN(1) ; elif k > 1 and k < n then a := [seq(i,i=1..k-1),seq(i,i=k+1..n)] ; elif k = n then a := [seq(i,i=1..k-1)] ; else a := [seq(i,i=2..n)] ; fi ; ilcm(op(a)) ; end: for n from 1 to 15 do for k from 1 to n do printf("%d, ",A094307(n,k)) ; od ; od ; # _R. J. Mathar_, Apr 30 2007
%t T[n_, k_] := LCM @@ Which[n == 1, {1}, 1 < k < n, Join[Range[k-1], Range[k+1, n]], k == n, Range[k-1], True, Range[2, n]];
%t Table[T[n, k], {n, 1, 15}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, May 20 2020 *)
%o (PARI) T(n,k) = lcm(setminus(vector(n, i, i), Set(k)));
%o tabl(nn) = {for (n=1, nn, for (k=1, n, print1(T(n, k), ", ");); print(););} \\ _Michel Marcus_, Jun 15 2019
%Y Cf. A094308.
%K nonn,tabl
%O 1,2
%A _Amarnath Murthy_, Apr 29 2004
%E More terms from _R. J. Mathar_, Apr 30 2007