login
A358061
a(n) = phi(n) mod tau(n).
1
0, 1, 0, 2, 0, 2, 0, 0, 0, 0, 0, 4, 0, 2, 0, 3, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 2, 0, 0, 0, 0, 4, 0, 0, 0, 3, 0, 2, 0, 0, 0, 4, 0, 2, 0, 2, 0, 6, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 4, 0, 2, 0, 4, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 2, 4, 0, 0, 0, 0, 2, 0, 0, 0, 0
OFFSET
1,4
COMMENTS
a(n) > 0 for n in A015733, a(n) = 0 for n in A020491.
FORMULA
a(n) = A000010(n) mod A000005(n).
EXAMPLE
For n = 4; a(4) = A000010(4) mod A000005(4) = 2 mod 3 = 2.
MATHEMATICA
a[n_] := Mod[EulerPhi[n], DivisorSigma[0, n]]; Array[a, 100] (* Amiram Eldar, Oct 28 2022 *)
PROG
(Python)
from math import prod
from sympy import factorint
def A358061(n):
f = factorint(n).items()
d = prod(e+1 for p, e in f)
return prod(pow(p, e-1, d)*((p-1)%d) for p, e in f) % d # Chai Wah Wu, Oct 29 2022
CROSSREFS
Cf. A000005 (tau), A000010 (phi), A015733, A020491.
Sequence in context: A331292 A331293 A335379 * A342121 A258764 A109083
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Oct 28 2022
STATUS
approved