|
|
A227128
|
|
The twisted Euler phi-function for the non-principal Dirichlet character mod 3.
|
|
2
|
|
|
1, 3, 3, 6, 6, 9, 6, 12, 9, 18, 12, 18, 12, 18, 18, 24, 18, 27, 18, 36, 18, 36, 24, 36, 30, 36, 27, 36, 30, 54, 30, 48, 36, 54, 36, 54, 36, 54, 36, 72, 42, 54, 42, 72, 54, 72, 48, 72, 42, 90, 54, 72, 54, 81, 72, 72, 54, 90, 60, 108, 60, 90, 54, 96
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The non-principal Dirichlet character mod 3 is chi(n) = A049347(n-1). The twisted Euler phi-function is defined as a(n) = phi(n,chi) = n*Product_{p|n} (1-chi(p)/p), where the product is over all primes p that divide n.
The sequence appears to be the Dirichlet convolution of the sequence A055615(n) and a sequence of signed 1's with the same characteristic function as A156277.
|
|
LINKS
|
|
|
FORMULA
|
Multiplicative with a(3^e) = 3^e, a(p^e) = p^(e-1)*(p-1) if p == 1 (mod 3) and a(p^e) = p^(e-1)*(p+1) if p == 2 (mod 3). - R. J. Mathar, Jul 10 2013
a(n) = A227128(n)/2 if n divisible by 3, and a(n) = A227128(n) otherwise.
Sum_{k=1..n} a(k) ~ c * n^2, where c = 1/(2 * A086724) = 0.639957... . (End)
|
|
MAPLE
|
chi := proc(n)
op(1+(n mod 3), [0, 1, -1]) ;
end proc:
local a, p ;
a := n ;
for p in numtheory[factorset](n) do
a := a*(1-chi(p)/p) ;
end do:
a ;
end proc:
|
|
MATHEMATICA
|
f[p_, e_] := If[Mod[p, 3] == 2, p + 1, p - 1]*p^(e - 1); f[3, e_] := 3^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 13 2022 *)
|
|
PROG
|
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 1] == 3, 3^f[i, 2], f[i, 1]^(f[i, 2] - 1) * (f[i, 1] + (-1)^(f[i, 1]%3))))}; \\ Amiram Eldar, Oct 13 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|