login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A094307
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.
3
1, 2, 1, 6, 3, 2, 12, 12, 4, 6, 60, 60, 20, 30, 12, 60, 60, 60, 30, 12, 60, 420, 420, 420, 210, 84, 420, 60, 840, 840, 840, 840, 168, 840, 120, 420, 2520, 2520, 2520, 2520, 504, 2520, 360, 1260, 840, 2520, 2520, 2520, 2520, 2520, 2520, 360, 1260, 840, 2520, 27720
OFFSET
1,2
COMMENTS
The leading diagonal and the first column are given by A003418 with a suitable offset 0 or 1.
FORMULA
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
EXAMPLE
Triangle begins:
1,
2, 1,
6, 3, 2,
12, 12, 4, 6,
60, 60, 20, 30, 12,
60, 60, 60, 30, 12, 60;
MAPLE
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
MATHEMATICA
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]];
Table[T[n, k], {n, 1, 15}, {k, 1, n}] // Flatten (* Jean-François Alcover, May 20 2020 *)
PROG
(PARI) T(n, k) = lcm(setminus(vector(n, i, i), Set(k)));
tabl(nn) = {for (n=1, nn, for (k=1, n, print1(T(n, k), ", "); ); print(); ); } \\ Michel Marcus, Jun 15 2019
CROSSREFS
Cf. A094308.
Sequence in context: A252095 A120435 A125901 * A097905 A094310 A165908
KEYWORD
nonn,tabl
AUTHOR
Amarnath Murthy, Apr 29 2004
EXTENSIONS
More terms from R. J. Mathar, Apr 30 2007
STATUS
approved