OFFSET
1,2
COMMENTS
The non-principal Dirichlet character mod 3 is chi = A102283. 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.
From Jianing Song, May 05 2026: (Start)
For n > 1, we have h(-3*n^2), the class number of the order of Z[(1+sqrt(-3))/2] with discriminant -3*n^2, is equal to (1/3)*a(n).
In general, let d < 0 be a fundamental discriminant and n be a positive integer such that d*n^2 < -4, then h(d*n^2) = L(0,kronecker(d,.)) * n * Product_{p|n, p prime} (1 - kronecker(d,p)/p). This is a combination of Theorem 7.24 in "Primes of the form x^2+ny^2" by Cox and the Dirichlet class number formula. Here L(0,kronecker(-3,.)) = 1/3.
For example, given L(0,kronecker(-3,.)) = 1/3, we have: h(-3*2^2) = (1/3)*a(2) = 1, h(-3*3^2) = (1/3)*a(3) = 1, h(-3*4^2) = (1/3)*a(4) = 2, ... (End)
REFERENCES
D. A. Cox, Primes of the form x^2+ny^2, Wiley, New York, 1989, p. 146.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Olivier Bordellès and Benoit Cloitre, An alternating sum involving the reciprocal of certain multiplicative functions, J. Int. Seq. 16 (2013), Article 13.6.3.
Jerzy Kaczorowski and Kazimierz Wiertelak, On the sum of the twisted Euler function, Int. J. Numb. Theory 8 (7) (2012), 1741-1761.
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
From Amiram Eldar, Oct 13 2022: (Start)
Sum_{k=1..n} a(k) ~ c * n^2, where c = 1/(2 * A086724) = 0.639957... . (End) [A-number corrected by Jianing Song, May 05 2026]
MAPLE
chi := proc(n)
op(1+(n mod 3), [0, 1, -1]) ;
end proc:
A227128 := proc(n)
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
R. J. Mathar, Jul 02 2013
STATUS
approved
