cp's OEIS Frontend

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.

A358061 a(n) = phi(n) mod tau(n).

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, Oct 28 2022

Keywords

Comments

a(n) > 0 for n in A015733, a(n) = 0 for n in A020491.

Examples

			For n = 4; a(4) = A000010(4) mod A000005(4) = 2 mod 3 = 2.
		

Crossrefs

Cf. A000005 (tau), A000010 (phi), A015733, A020491.

Programs

  • Mathematica
    a[n_] := Mod[EulerPhi[n], DivisorSigma[0, n]]; Array[a, 100] (* Amiram Eldar, Oct 28 2022 *)
  • 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

Formula

a(n) = A000010(n) mod A000005(n).