%I #43 Nov 27 2022 02:08:14
%S 1,1,4,1,1,4,1,1,13,1,1,4,1,1,4,1,1,13,1,1,4,1,1,4,1,1,40,1,1,4,1,1,4,
%T 1,1,13,1,1,4,1,1,4,1,1,13,1,1,4,1,1,4,1,1,40,1,1,4,1,1,4,1,1,13,1,1,
%U 4,1,1,4,1,1,13,1,1,4,1,1,4,1,1,121,1,1,4,1,1,4,1,1,13,1,1,4,1,1,4,1,1
%N a(n) = (3^(v_3(n) + 1) - 1)/2, where v_3(n) = highest power of 3 dividing n = A007949(n).
%C Denominator of the quotient sigma(3*n)/sigma(n). - _Labos Elemer_, Nov 04 2003
%C a(n) = b/(3*(c+d)) where b, c, d are the sums of the divisors of 3*n that are congruent respectively to 0, 1 and 2 mod 3. - _Michel Lagneau_, Nov 05 2012
%C Sum of powers of 3 dividing n. - _Amiram Eldar_, Nov 27 2022
%H Amiram Eldar, <a href="/A080278/b080278.txt">Table of n, a(n) for n = 1..10000</a>
%H Klaus Brockhaus, <a href="/A080278/a080278.gif">Illustration of A080278 and A080333</a>
%F G.f.: Sum_{k>=0} 3^k*x^(3^k)/(1-x^(3^k)). - _Ralf Stephan_, Jun 15 2003
%F L.g.f.: -log(Product_{k>=0} (1 - x^(3^k))) = Sum_{n>=1} a(n)*x^n/n. - _Ilya Gutkovskiy_, Mar 15 2018
%F a(n) = sigma(n)/(sigma(3*n) - 3*sigma(n)), where sigma(n) = A000203(n). - _Peter Bala_, Jun 10 2022
%F From _Amiram Eldar_, Nov 27 2022: (Start)
%F Multiplicative with a(3^e) = (3^(e+1)-1)/2, and a(p^e) = 1 for p != 3.
%F Dirichlet g.f.: zeta(s) / (1 - 3^(1 - s)).
%F Sum_{k=1..n} a(k) ~ n*log_3(n) + (1/2 + (gamma - 1)/log(3))*n, where gamma is Euler's constant (A001620). (End)
%e a(6) = 4 because the divisors of 3*6 = 18 are {1, 2, 3, 6, 9, 18} => b = 3 + 6 + 9 + 18 = 36, c = 1, d = 2, hence a(6) = b/(3*(c+d)) = 36/(3*(1+2)) = 36/9 = 4. - _Michel Lagneau_, Nov 05 2012
%p A080278 := n->(3^(A007949(n)+1)-1)/2;
%t Table[Denominator[DivisorSigma[1, 3*n]/DivisorSigma[1, n]], {n, 1, 128}]
%t a[n_] := (3^(IntegerExponent[n, 3] + 1) - 1)/2; Array[a, 100] (* _Amiram Eldar_, Nov 27 2022 *)
%o (PARI) a(n) = denominator(sigma(3*n)/sigma(n)); \\ _Michel Marcus_, Dec 15 2019
%o (PARI) a(n) = (3^(valuation(n, 3) + 1) - 1)/2; \\ _Amiram Eldar_, Nov 27 2022
%Y Cf. A000203, A001620, A007949, A080333, A088838 (numerator of sigma(3*n)/sigma(n)).
%K nonn,mult,frac
%O 1,3
%A _N. J. A. Sloane_, Mar 19 2003