OFFSET
0,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
FORMULA
From Andrew Howroyd, Sep 15 2019: (Start)
Inverse Moebius transform of A045665.
MATHEMATICA
b[n_] := Module[{t = 0, r = n}, If[n == 0, 1, While[Mod[r, 2] == 0, r = r/2; t += 2^(r - 1)]; t + 2^Quotient[r, 2]]];
c[n_] := Sum[MoebiusMu[d]*d, {d, Divisors[n]}];
a[n_] := If[n == 0, 1, 2*Sum[c[n/d]*d*b[d], {d, Divisors[n]}]];
a /@ Range[0, 36] (* Jean-François Alcover, Sep 23 2019, from PARI *)
PROG
b(n) = if(n<1, n==0, my(t=0, r=n); while(r%2==0, r=r/2; t+=2^(r-1)); t + 2^(r\2));
c(n) = {sumdiv(n, d, moebius(d)*d)}
a(n) = if(n<1, n==0, 2*sumdiv(n, d, c(n/d)*d*b(d))); \\ Andrew Howroyd, Sep 15 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved