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.

A357905 a(n) = log_3(A060839(n)).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 2, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1
Offset: 1

Views

Author

Jianing Song, Oct 19 2022

Keywords

Comments

3-rank of the multiplicative group of integers modulo n.

Examples

			a(63) = 2 since (Z/63Z)* = C_6 X C_6 has 3-rank 2.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[Mod[p, 3] == 1, 1, 0]; f[3, e_] := 1; f[3, 1] = 0; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 05 2023 *)
  • PARI
    a(n)=my(f=factor(n)); sum(i=1, #f~, if(f[i, 1]==3, min(f[i, 2]-1, 1), if(f[i, 1]%3==1, 1, 0)))
    
  • Python
    from sympy import factorint
    def A357905(n): return sum(1 for p, e in factorint(n).items() if (p!=3 or e!=1) and p%3!=2) # Chai Wah Wu, Oct 19 2022

Formula

Additive with a(3) = 0, a(3^e) = 1, e >= 2; a(p^e) = 1 for p == 1 (mod 3), 0 for p == 2 (mod 3).