OFFSET
1,2
FORMULA
G.f.: (1/2) * Sum_{k>0} (1/(1 - 2 * x^k)^k - 1).
G.f.: (1/2) * Sum_{k>0} (2 * x)^k/(1 - x^k)^(k+1).
If p is prime, a(p) = p + 2^(p-1).
MATHEMATICA
a[n_] := DivisorSum[n, 2^(#-1) * Binomial[# + n/# - 1, #] &]; Array[a, 50] (* Amiram Eldar, Jul 31 2023 *)
PROG
(PARI) a(n) = sumdiv(n, d, 2^(d-1)*binomial(d+n/d-1, d));
(PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, (1/(1-2*x^k)^k-1))/2)
(PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, (2*x)^k/(1-x^k)^(k+1))/2)
(Python)
from math import comb
from sympy import divisors
def A357041(n): return sum(comb(d+n//d-1, d)<<d-1 for d in divisors(n, generator=True)) # Chai Wah Wu, Feb 27 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Feb 26 2023
STATUS
approved