%I #18 May 31 2024 05:50:07
%S 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,
%T 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,
%U 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
%N a(n) = 1 if the 2-adic valuation of n is a multiple of 3, otherwise 0.
%H Antti Karttunen, <a href="/A373157/b373157.txt">Table of n, a(n) for n = 1..100000</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.
%F Multiplicative with a(p^e) = 1 if e is a multiple of 3, or p > 2, otherwise 0.
%F a(n) = [A007814(n) == 0 (mod 3)], where [ ] is the Iverson bracket.
%F a(n) = [A191255(n) = 0 or 3].
%F Sum_{k=1..n} a(k) ~ (4/7) * n. - _Amiram Eldar_, May 31 2024
%t a[n_] := If[Divisible[IntegerExponent[n, 2], 3], 1, 0]; Array[a, 100] (* _Amiram Eldar_, May 31 2024 *)
%o (PARI) A373157(n) = !(valuation(n,2)%3);
%Y Characteristic function of A191257.
%Y Cf. A001511, A007814, A191255.
%K nonn,mult,easy
%O 1
%A _Antti Karttunen_, May 28 2024