login
a(n) = A324728(n) - A061395(n).
2

%I #7 Mar 17 2019 21:08:15

%S 0,0,0,2,0,1,0,3,2,1,0,2,0,1,2,4,0,1,0,2,2,1,0,3,2,1,3,2,0,3,0,5,1,1,

%T 2,4,0,1,2,3,0,1,0,2,3,1,0,4,2,1,1,2,0,1,2,3,2,1,0,2,0,1,1,6,1,2,0,2,

%U 1,1,0,5,0,1,3,2,2,1,0,4,5,1,0,3,2,1,2,3,0,4,2,2,1,1,2,5,0,1,3,4,0,2,0,3,3

%N a(n) = A324728(n) - A061395(n).

%C The first negative term is a(182) = -6, as A324712(182) = 0 and 182 = 2*7*13 = prime(1) * prime(4) * prime(6).

%C The next negative term after that is a(198) = -4, as A324712(198) = 1, and 198 = 2 * 3^2 * 11 = prime(1) * prime(2)^2 * prime(5).

%C There are only 161 negative terms among the first 10000 terms.

%H Antti Karttunen, <a href="/A324811/b324811.txt">Table of n, a(n) for n = 1..10000</a> (based on Hans Havermann's factorization of A156552)

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%H <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>

%F a(n) = A324728(n) - A061395(n).

%F a(p) = 0 for all primes p.

%o (PARI)

%o A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));

%o A324712(n) = { my(v=0); fordiv(n, d, if(issquarefree(n/d), v=bitxor(v, A323243(d)))); (v); }; \\ Needs also code from A323243.

%o A000523(n) = if( n<1, 0, #binary(n) - 1); \\ From A000523

%o A324728(n) = { my(k=A324712(n)); if(!k,k,(1+A000523(k))); };

%o A324811(n) = (A324728(n) - A061395(n));

%Y Cf. A000523, A061395, A323243, A324712, A324728.

%K sign

%O 1,4

%A _Antti Karttunen_, Mar 17 2019