%I #39 Aug 23 2023 08:42:22
%S 1,4,10,37,82,352,730,2998,7291,26488,59050,263170,531442,2127952,
%T 5373460,19669879,43046722,187086916,387420490,1607136634,3878987860,
%U 13947314752,31381059610,139902374692,285916320883,1129719740248,2824682785300,10460357985970
%N a(n) = Sum_{d|n} 3^(n-d).
%F G.f.: Sum_{k>=1} 3^(k-1) * x^k/(1 - 3^(k-1) * x^k).
%F G.f.: Sum_{k>=1} x^k/(1 - (3 * x)^k).
%t a[n_] := DivisorSum[n, 3^(n-#) &]; Array[a, 28] (* _Amiram Eldar_, Aug 23 2023 *)
%o (PARI) a(n) = sumdiv(n, d, 3^(n-d));
%o (PARI) my(N=30, x='x+O('x^N)); Vec(sum(k=1, N, 3^(k-1)*x^k/(1-3^(k-1)*x^k)))
%o (PARI) my(N=30, x='x+O('x^N)); Vec(sum(k=1, N, x^k/(1-(3*x)^k)))
%Y Cf. A074854, A112329, A359206.
%Y Cf. A342628, A342629, A359203.
%K nonn,easy
%O 1,2
%A _Seiichi Manyama_, Dec 20 2022