|
|
A145378
|
|
a(n) = Sum_{d|n} sigma(d) - 2*Sum_{2c|n} sigma(c) + 4*Sum_{4b|n} sigma(b).
|
|
2
|
|
|
1, 2, 5, 7, 7, 10, 9, 20, 18, 14, 13, 35, 15, 18, 35, 49, 19, 36, 21, 49, 45, 26, 25, 100, 38, 30, 58, 63, 31, 70, 33, 110, 65, 38, 63, 126, 39, 42, 75, 140, 43, 90, 45, 91, 126, 50, 49, 245, 66, 76, 95, 105, 55, 116, 91, 180, 105, 62, 61, 245, 63, 66, 162, 235, 105, 130, 69
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Dirichlet convolution of [1,-2,0,4,0,0,0,...] with A007429.
|
|
LINKS
|
|
|
FORMULA
|
Dirichlet g.f.: (1-2/2^s+4/4^s)*(zeta(s))^2*zeta(s-1).
Multiplicative with a(2^e) = 2^(e+2) - 3*(e+1) and a(p^e) = (p*(p^(e+1)-1) - (p-1)*(e+1))/(p-1)^2 if p > 2.
Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^4/96 = 1.01467803... (A300707). (End)
|
|
MAPLE
|
with(numtheory); g:=proc(n) local d, c, b, t0, t1, t2, t3;
t1:=divisors(n);
t0:=add( sigma(d), d in t1);
t2:=0; for d in t1 do if d mod 2 = 0 then t2:=t2+sigma(d/2); fi; od:
t3:=0; for d in t1 do if d mod 4 = 0 then t3:=t3+sigma(d/4); fi; od:
t0-2*t2+4*t3; end;
[seq(g(n), n=1..100)];
# alternative
read("transforms") : nmax := 100 :
L27 := [seq(i, i=1..nmax) ];
L := [1, -2, 0, 4, seq(0, i=1..nmax)] ;
DIRICHLET(L27, L) :
MOBIUSi(%) :
|
|
MATHEMATICA
|
a[n_] := Sum[DivisorSigma[1, d] - 2 Boole[Mod[d, 2] == 0] DivisorSigma[1, d/2] + 4 Boole[Mod[d, 4] == 0] DivisorSigma[1, d/4], {d, Divisors[n]}];
f[p_, e_] := (p*(p^(e + 1) - 1) - (p - 1)*(e + 1))/(p - 1)^2; f[2, e_] := 2^(e + 2) - 3*(e + 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 25 2022 *)
|
|
PROG
|
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 1] == 2, 2^(f[i, 2]+2) - 3*(f[i, 2]+1), (f[i, 1]*(f[i, 1]^(f[i, 2]+1)-1) - (f[i, 1]-1)*(f[i, 2]+1))/(f[i, 1]-1)^2)); } \\ Amiram Eldar, Oct 25 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|