OFFSET
1,2
COMMENTS
We have Q_2* = 2^Z X Z_2*, so Q_2*/(Q_2*)^k = (2^Z/2^(kZ)) X (Z_p*/(Z_2*)^k). Note that 2^Z/2^(kZ) is a cyclic group of order k. For the group structure of (Z_2*/(Z_2*)^k), see A370050.
LINKS
Jianing Song, Table of n, a(n) for n = 1..10000
FORMULA
If n is odd, then a(n) = n. If n = 2^e * n' is even, where n' is odd, then a(n) = n * 2^(e+1).
Multiplicative with a(2^e) = 2^(2*e+1).
a(n) = n * A297402(n).
From Amiram Eldar, May 20 2024: (Start)
Dirichlet g.f.: ((1 - 1/2^(s-1)) * (1 + 1/2^(s-2)) / (1 - 1/2^(s-2))) * zeta(s-1).
Sum_{k=1..n} a(k) ~ (n^2/(2*log(2))) * (log(n) + gamma - 1/2 + log(2)), where gamma is Euler's constant (A001620). (End)
MATHEMATICA
a[n_] := Module[{e = IntegerExponent[n, 2]}, 2^If[e == 0, 0, e + 1] * n]; Array[a, 100] (* Amiram Eldar, May 20 2024 *)
PROG
(PARI) a(n) = my(e = valuation(n, 2)); n * 2^e * if(e>=1, 2, 1)
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Jianing Song, Apr 30 2024
STATUS
approved