OFFSET
1,2
FORMULA
MATHEMATICA
f[p_, e_] := 2*(p^(e + 1) - 1)/(p - 1) - 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 60] (* Amiram Eldar, Oct 24 2022 *)
PROG
(PARI) a(n) = sumdiv(n, d, d * 2^omega(d)); \\ Michel Marcus, Oct 31 2022
(Python)
from math import prod
from sympy import factorint
def A357938(n): return prod(((p**(e+1)-1)//(p-1)<<1)-1 for p, e in factorint(n).items()) # Chai Wah Wu, Oct 31 2022
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Werner Schulte, Oct 24 2022
STATUS
approved