A357905 a(n) = log_3(A060839(n)).
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
Examples
a(63) = 2 since (Z/63Z)* = C_6 X C_6 has 3-rank 2.
Links
- Jianing Song, Table of n, a(n) for n = 1..10000
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).
Comments