A099740 a(n) = Sum_{k|n} k!*mu(k), where mu() is the Moebius function.
1, -1, -5, -1, -119, 713, -5039, -1, -5, 3628679, -39916799, 713, -6227020799, 87178286159, 1307674367875, -1, -355687428095999, 713, -121645100408831999, 3628679, 51090942171709434955, 1124000727777567763199, -25852016738884976639999, 713, -119, 403291461126605629356979199
Offset: 1
Keywords
Programs
-
Mathematica
f[n_] := Block[{k = Divisors[n]}, Plus @@ (k!MoebiusMu[k])]; Table[ f[n], {n, 25}] (* Robert G. Wilson v, Nov 12 2004 *)
-
PARI
a(n) = sumdiv(n, d, d!*moebius(d)); \\ Michel Marcus, Feb 19 2017
Formula
G.f.: Sum_{k>=1} mu(k)*k!*x^k/(1 - x^k). - Ilya Gutkovskiy, Feb 19 2017
Extensions
More terms from Robert G. Wilson v, Nov 12 2004
Comments