%I #18 Jun 26 2024 02:06:13
%S 1,4,10,31,82,256,730,2218,6571,19768,59050,177430,531442,1595056,
%T 4783060,14351125,43046722,129146980,387420490,1162281262,3486785140,
%U 10460412256,31381059610,94143358444,282429536563,847289140888,2541865834900,7625599080070,22876792454962
%N Dirichlet convolution of b_n=1 with c_n=3^(n-1).
%H Seiichi Manyama, <a href="/A034730/b034730.txt">Table of n, a(n) for n = 1..2000</a>
%F G.f.: Sum_{n>0} x^n/(1-3*x^n). - _Vladeta Jovovic_, Nov 14 2002
%F a(n) ~ 3^(n-2). - _Vaclav Kotesovec_, Sep 09 2014
%F a(n) = Sum_{d|n} 3^(d-1). - _Seiichi Manyama_, Jun 26 2019
%t Rest[CoefficientList[Series[Sum[x^k/(1-3*x^k),{k,1,30}],{x,0,30}],x]] (* _Vaclav Kotesovec_, Sep 09 2014 *)
%t A034730[n_]:= DivisorSum[n, 3^(#-1) &];
%t Table[A034730[n], {n,40}] (* _G. C. Greubel_, Jun 25 2024 *)
%o (PARI) {a(n) = sumdiv(n, d, 3^(d-1))} \\ _Seiichi Manyama_, Jun 26 2019
%o (Magma)
%o A034730:= func< n | (&+[3^(d-1): d in Divisors(n)]) >;
%o [A034730(n): n in [1..40]]; // _G. C. Greubel_, Jun 25 2024
%o (SageMath)
%o def A034730(n): return sum(3^(k-1) for k in (1..n) if (k).divides(n))
%o [A034730(n) for n in range(1,41)] # _G. C. Greubel_, Jun 25 2024
%Y Sums of the form Sum_{d|n} q^(d-1): A034729 (q=2), this sequence (q=3), A113999 (q=10), A339684 (q=4), A339685 (q=5), A339686 (q=6), A339687 (q=7), A339688 (q=8), A339689 (q=9).
%K nonn
%O 1,2
%A _Erich Friedman_