login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A356539
a(n) = Sum_{d|n} d * 3^(n-d).
3
1, 5, 12, 49, 86, 492, 736, 3977, 8757, 34030, 59060, 384924, 531454, 2672528, 6672552, 26093113, 43046738, 261646137, 387420508, 2181624374, 4682526672, 17435870644, 31381059632, 204908769276, 299863458511, 1412168408630, 3392641222200, 13912336721584
OFFSET
1,2
FORMULA
G.f.: Sum_{k>=1} k * x^k/(1 - (3 * x)^k).
If p is prime, a(p) = p + 3^(p-1).
MATHEMATICA
a[n_] := DivisorSum[n, # * 3^(n - #) &]; Array[a, 30] (* Amiram Eldar, Aug 11 2022 *)
PROG
(PARI) a(n) = sumdiv(n, d, d*3^(n-d));
(PARI) my(N=30, x='x+O('x^N)); Vec(sum(k=1, N, k*x^k/(1-(3*x)^k)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Aug 11 2022
STATUS
approved