OFFSET
1,2
COMMENTS
We have Q_3* = 3^Z X Z_3*, so Q_3*/(Q_3*)^k = (3^Z/3^(kZ)) X (Z_p*/(Z_3*)^k). Note that 3^Z/3^(kZ) is a cyclic group of order k. For the group structure of (Z_3*/(Z_3*)^k), see A370050.
LINKS
Jianing Song, Table of n, a(n) for n = 1..10000
FORMULA
Write n = 3^e * n' with k' not being divisible by 3, then a(n) = n * 3^e * gcd(2,n').
Multiplicative with a(3^e) = 3^(2*e), a(2^e) = 2^(e+1) and a(p^e) = p^e for primes p != 2, 3.
a(n) = n * A370180(n).
From Amiram Eldar, May 20 2024: (Start)
Dirichlet g.f.: ((1 + 1/2^(s-1)) * (1 - 1/3^(s-1))/(1 - 1/3^(s-2))) * zeta(s-1).
Sum_{k=1..n} a(k) ~ (n^2/(2*log(3))) * (log(n) + gamma - 1/2 + log(3) - log(2)/3), where gamma is Euler's constant (A001620). (End)
MATHEMATICA
a[n_] := Module[{e2 = IntegerExponent[n, 2], e3 = IntegerExponent[n, 3]}, 2^Min[e2, 1] * 3^e3 * n]; Array[a, 100] (* Amiram Eldar, May 20 2024 *)
PROG
(PARI) a(n, {p=3}) = my(e = valuation(n, p)); n * p^e*gcd(p-1, n/p^e)
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Jianing Song, Apr 30 2024
STATUS
approved