login
A373991
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
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, 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, 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
OFFSET
0
FORMULA
a(n) = A079978(A328768(n)).
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.
a(n) = [A007949(n) > 1] + [A007949(n) = 0]*[A007814(n) == 0 (mod 3)], where [ ] is the Iverson bracket.
a(n) = A267142(n) + A374043(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 31/63. - Amiram Eldar, Jun 28 2024
MATHEMATICA
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 *)
PROG
(PARI)
A002110(n) = prod(i=1, n, prime(i));
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]));
A373991(n) = !(A328768(n)%3);
(PARI) A373991(n) = if(!(n%9), 1, if(!(n%3), 0, if(!(n%8), A373991(n/8), (n%2))));
(PARI) A373991(n) = { my(v2 = valuation(n, 2), v3 = valuation(n, 3)); ((v3 > 1) || (0==v3 && 0==(v2%3))); };
CROSSREFS
Characteristic function of A373992.
Sequence in context: A266837 A321081 A267126 * A266892 A267152 A151667
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Jun 26 2024
STATUS
approved