This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A227128 #19 Oct 13 2022 06:39:21 %S A227128 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, %T A227128 36,27,36,30,54,30,48,36,54,36,54,36,54,36,72,42,54,42,72,54,72,48,72, %U A227128 42,90,54,72,54,81,72,72,54,90,60,108,60,90,54,96 %N A227128 The twisted Euler phi-function for the non-principal Dirichlet character mod 3. %C A227128 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. %C A227128 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. %C A227128 Sequences phi(n,chi) are defined as well for chi=A101455, chi=A080891, chi=A134667 and so on. %H A227128 Amiram Eldar, <a href="/A227128/b227128.txt">Table of n, a(n) for n = 1..10000</a> %H A227128 Olivier Bordellès and Benoit Cloitre, <a href="http://cs.uwaterloo.ca/journals/JIS/VOL16/Bordelles/bord14.html">An alternating sum involving the reciprocal of certain multiplicative functions</a>, J. Int. Seq. 16 (2013), Article 13.6.3. %H A227128 Jerzy Kaczorowski and Kazimierz Wiertelak, <a href="http://dx.doi.org/10.1142/S179304211250100X">On the sum of the twisted Euler function</a>, Int. J. Numb. Theory 8 (7) (2012), 1741-1761. %F A227128 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 %F A227128 From _Amiram Eldar_, Oct 13 2022: (Start) %F A227128 a(n) = A227128(n)/2 if n divisible by 3, and a(n) = A227128(n) otherwise. %F A227128 Sum_{k=1..n} a(k) ~ c * n^2, where c = 1/(2 * A086724) = 0.639957... . (End) %p A227128 chi := proc(n) %p A227128 op(1+(n mod 3),[0,1,-1]) ; %p A227128 end proc: %p A227128 A227128 := proc(n) %p A227128 local a,p ; %p A227128 a := n ; %p A227128 for p in numtheory[factorset](n) do %p A227128 a := a*(1-chi(p)/p) ; %p A227128 end do: %p A227128 a ; %p A227128 end proc: %t A227128 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 *) %o A227128 (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 %Y A227128 Cf. A049347, A080891, A086724, A101455, A134667, A195459 (for the principal character mod 3), A227128. %K A227128 nonn,easy,mult %O A227128 1,2 %A A227128 _R. J. Mathar_, Jul 02 2013