login
a(n) = 1 if A328768(n) is a multiple of 3, otherwise 0, where A328768 is the first primorial based variant of arithmetic derivative.
6

%I #22 Jun 28 2024 04:52:04

%S 1,1,0,0,0,1,0,1,1,1,0,1,0,1,0,0,0,1,1,1,0,0,0,1,0,1,0,1,0,1,0,1,0,0,

%T 0,1,1,1,0,0,1,1,0,1,0,1,0,1,0,1,0,0,0,1,1,1,1,0,0,1,0,1,0,1,1,1,0,1,

%U 0,0,0,1,1,1,0,0,0,1,0,1,0,1,0,1,0,1,0,0,1,1,1,1,0,0,0,1,0,1,0,1,0,1,0,1,1,0,0,1,1,1,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,1,1

%N a(n) = 1 if A328768(n) is a multiple of 3, otherwise 0, where A328768 is the first primorial based variant of arithmetic derivative.

%H Antti Karttunen, <a href="/A373991/b373991.txt">Table of n, a(n) for n = 0..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) = A079978(A328768(n)).

%F For all n >= 0, a(9*n) = 1, a(3*(3n+1)) = a(3*(3n+2)) = 0, a(8*n) = a(n), a(8n+4) = a(4n+2) = 0, and a(2n+1) = 1 when A007949(2n+1) != 1.

%F a(n) = [A007949(n) > 1] + [A007949(n) = 0]*[A007814(n) == 0 (mod 3)], where [ ] is the Iverson bracket.

%F a(n) = A267142(n) + A374043(n).

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 31/63. - _Amiram Eldar_, Jun 28 2024

%t a[n_] := If[Divisible[n, 9] || (!Divisible[n, 3] && Divisible[IntegerExponent[n, 2], 3]), 1, 0]; Array[a, 100, 0] (* _Amiram Eldar_, Jun 28 2024 *)

%o (PARI)

%o A002110(n) = prod(i=1,n,prime(i));

%o A328768(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]*A002110(primepi(f[i,1])-1)/f[i, 1]));

%o A373991(n) = !(A328768(n)%3);

%o (PARI) A373991(n) = if(!(n%9), 1, if(!(n%3), 0, if(!(n%8), A373991(n/8), (n%2))));

%o (PARI) A373991(n) = { my(v2 = valuation(n, 2), v3 = valuation(n, 3)); ((v3 > 1) || (0==v3 && 0==(v2%3))); };

%Y Characteristic function of A373992.

%Y Cf. A002110, A007814, A007949, A079978, A267142, A328768, A374043.

%K nonn,easy

%O 0

%A _Antti Karttunen_, Jun 26 2024