%I #13 May 29 2024 07:05:23
%S 1,0,0,0,1,1,1,1,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,1,0,1,1,1,0,0,0,
%T 1,1,1,0,0,1,1,1,1,0,0,0,1,1,1,0,0,0,1,0,1,1,0,0,1,0,1,0,0,1,1,1,1,0,
%U 0,0,1,0,1,0,0,0,1,1,1,0,0,0,1,0,1,0,0,1,1,0,1,0,0,0,1,0,1,0,0,0,1,1,1,1,0,0,1,0,1,0,0,0,1,1,1,0,0,0,1,0,1
%N a(n) = 1 if A276085(n) is a multiple of 3, otherwise 0, where A276085 is the primorial base log-function.
%C a(n) = 1 iff n is of the form 2^i * 3^j * k, with k in A007310 [i.e., gcd(k, 6) = 1], and i == j (mod 3).
%H Antti Karttunen, <a href="/A372573/b372573.txt">Table of n, a(n) for n = 1..100000</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.
%H <a href="/index/Pri#primorial_numbers">Index entries for sequences related to primorial numbers</a>.
%F a(n) = [A276085(n) == 0 (mod 3)], where [ ] is the Iverson bracket.
%F Sum_{k=1..n} a(k) ~ (43/91) * n. - _Amiram Eldar_, May 29 2024
%t a[n_] := If[Divisible[Differences[IntegerExponent[n, {2, 3}]][[1]], 3], 1, 0]; Array[a, 100] (* _Amiram Eldar_, May 29 2024 *)
%o (PARI)
%o A002110(n) = prod(i=1,n,prime(i));
%o A276085(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*A002110(primepi(f[k, 1])-1)); };
%o A372573(n) = !(A276085(n)%3);
%Y Characteristic function of A339746.
%Y Cf. A002110, A007310, A276085.
%Y Cf. also A369001.
%K nonn,easy
%O 1
%A _Antti Karttunen_, May 26 2024
|