OFFSET
0,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = 2*n*Sum_{d|n} mu(n/d)*2^(d-1) for n > 0. - Andrew Howroyd, Sep 14 2019
MATHEMATICA
a[n_] := If[n == 0, 1, 2n Sum[MoebiusMu[n/d] 2^(d-1), {d, Divisors[n]}]];
a /@ Range[0, 30] (* Jean-François Alcover, Sep 23 2019, from PARI *)
PROG
(PARI) a(n)={if(n<1, n==0, 2*n*sumdiv(n, d, moebius(n/d)*2^(d-1)))} \\ Andrew Howroyd, Sep 14 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved