OFFSET
1,2
COMMENTS
Inverse Moebius transform of A050469.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{d|n} A050469(d).
From Amiram Eldar, Aug 28 2023: (Start)
Multiplicative with a(2^e) = 2^(e+1)-1, and if p is an odd prime a(p^e) = (p^(e+2)-(e+2)*p+e+1)/(p-1)^2 if p == 1 (mod 4) and (2*p^(e+2) + ((-1)^e-1)*p - ((-1)^e+1))/(2*(p^2-1)) otherwise.
MATHEMATICA
nmax = 65; CoefficientList[Series[Sum[DivisorSigma[1, k] x^k/(1 + x^(2 k)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
A050469[n_] := DivisorSum[n, # &, MemberQ[{1}, Mod[n/#, 4]] &] - DivisorSum[n, # &, MemberQ[{3}, Mod[n/#, 4]] &]; a[n_] := DivisorSum[n, A050469[#] &]; Table[a[n], {n, 1, 65}]
f[p_, e_] := If[Mod[p, 4] == 1, (p^(e+2)-(e+2)*p+e+1)/(p-1)^2, (2*p^(e+2) + ((-1)^e-1)*p - ((-1)^e+1))/(2*(p^2-1))]; f[2, e_] := 2^(e+1)-1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 70] (* Amiram Eldar, Aug 28 2023 *)
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; if(p == 2, 2^(e+1)-1, if(p%4 == 1, (p^(e+2)-(e+2)*p+e+1)/(p-1)^2, (2*p^(e+2) + ((-1)^e-1)*p - ((-1)^e+1))/(2*(p^2-1))))); } \\ Amiram Eldar, Aug 28 2023
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Ilya Gutkovskiy, Sep 14 2019
STATUS
approved