Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A373157
a(n) = 1 if the 2-adic valuation of n is a multiple of 3, otherwise 0.
3
1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1
OFFSET
1
FORMULA
Multiplicative with a(p^e) = 1 if e is a multiple of 3, or p > 2, otherwise 0.
a(n) = [A007814(n) == 0 (mod 3)], where [ ] is the Iverson bracket.
a(n) = [A191255(n) = 0 or 3].
Sum_{k=1..n} a(k) ~ (4/7) * n. - Amiram Eldar, May 31 2024
MATHEMATICA
a[n_] := If[Divisible[IntegerExponent[n, 2], 3], 1, 0]; Array[a, 100] (* Amiram Eldar, May 31 2024 *)
PROG
(PARI) A373157(n) = !(valuation(n, 2)%3);
CROSSREFS
Characteristic function of A191257.
Sequence in context: A195062 A351077 A229940 * A179761 A317906 A102863
KEYWORD
nonn,mult,easy
AUTHOR
Antti Karttunen, May 28 2024
STATUS
approved