OFFSET
1,2
FORMULA
Multiplicative with a(p^e) = (2 + ((e+1)*p^2 - 2*p - e - 1)*p^e)/(p-1)^2. - Amiram Eldar, Sep 15 2023
From Vaclav Kotesovec, Sep 15 2023: (Start)
Dirichlet g.f.: zeta(s)^2 * zeta(s-1)^2 / zeta(2*s).
Sum_{k=1..n} a(k) ~ 5*n^2 * (log(n)/4 + gamma/2 - 1/8 + 3*zeta'(2)/Pi^2 - 45*zeta'(4)/Pi^4), where gamma is the Euler-Mascheroni constant A001620. (End)
MATHEMATICA
f[p_, e_] := (2 + ((e + 1)*p^2 - 2*p - e - 1)*p^e)/(p - 1)^2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 15 2023 *)
PROG
(PARI) for(n=1, 100, print1(direuler(p=2, n, (1+X) / ((1-X) * (1 - p*X)^2))[n], ", ")) \\ Vaclav Kotesovec, Sep 15 2023
(Python)
from sympy import divisors, primefactors, prod, reduced_totient, divisor_sigma
def psi(n):
return n*prod(p+1 for p in primefactors(n))//prod(primefactors(n))
def a(n): return sum(divisor_sigma(d, 1) * psi(n//d) for d in divisors(n))
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Torlach Rush, Sep 14 2023
STATUS
approved