[go: up one dir, main page]

login
A359018
a(n) = Sum_{d|n} d * 3^(d-1).
3
1, 7, 28, 115, 406, 1492, 5104, 17611, 59077, 197242, 649540, 2127364, 6908734, 22325632, 71744968, 229600123, 731794258, 2324583475, 7360989292, 23245426690, 73222477552, 230128420012, 721764371008, 2259438436708, 7060738412431, 22029510754258, 68630377423960
OFFSET
1,2
LINKS
FORMULA
G.f.: Sum_{k>=1} x^k/(1 - 3 * x^k)^2.
MATHEMATICA
a[n_] := DivisorSum[n, 3^(#-1)*# &]; Array[a, 27] (* Amiram Eldar, Aug 27 2023 *)
PROG
(PARI) a(n) = sumdiv(n, d, d*3^(d-1));
(PARI) my(N=30, x='x+O('x^N)); Vec(sum(k=1, N, x^k/(1-3*x^k)^2))
(Magma)
A359018:= func< n | (&+[3^(d-1)*d: d in Divisors(n)]) >;
[A359018(n): n in [1..40]]; // G. C. Greubel, Jun 26 2024
(SageMath)
def A359018(n): return sum(3^(k-1)*k for k in (1..n) if (k).divides(n))
[A359018(n) for n in range(1, 41)] # G. C. Greubel, Jun 26 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Dec 19 2022
STATUS
approved