OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..700
FORMULA
a(n) = A003418(n) * (n - Sum_{frac(log_p(n)) < log_p(2)} (1 - 1/p)). - Charlie Neder, Jun 13 2019
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: A094308 := proc(n) local k ; add( A094307(n, k), k=1..n) ; end: for n from 1 to 40 do printf("%d, ", A094308(n)) ; 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]];
a[n_] := Sum[T[n, k], {k, 1, n}];
Array[a, 30] (* Jean-François Alcover, May 20 2020 *)
PROG
(PARI) T(n, k) = lcm(setminus(vector(n, i, i), Set(k))); \\ A094307
a(n) = sum(k=1, n, T(n, k)); \\ Michel Marcus, May 20 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 29 2004
EXTENSIONS
More terms from R. J. Mathar, Apr 30 2007
STATUS
approved