login
A324735
Difference between the binary length and the binary weight of A324712. a(n) = 0 if A324712(n) = 0.
4
0, 0, 0, 1, 0, 2, 0, 2, 0, 1, 0, 0, 0, 2, 2, 4, 0, 0, 0, 2, 2, 2, 0, 3, 1, 3, 3, 2, 0, 2, 0, 3, 3, 3, 4, 3, 0, 2, 4, 5, 0, 3, 0, 3, 2, 3, 0, 3, 2, 2, 7, 3, 0, 2, 4, 3, 4, 5, 0, 2, 0, 5, 3, 5, 4, 1, 0, 5, 3, 2, 0, 3, 0, 3, 3, 2, 4, 1, 0, 3, 5, 6, 0, 1, 6, 4, 6, 4, 0, 1, 2, 5, 5, 6, 5, 4, 0, 3, 4, 3, 0, 4, 0, 7, 3
OFFSET
1,6
COMMENTS
Number of nonleading 0-bits in A324712(n), with a(n) = 0 if A324712(n) = 0.
FORMULA
a(n) = A324728(n) - A324829(n).
If A324712(n) > 0, then a(n) = -1 + A324734(n) + A324724(n).
a(p) = 0 for all primes p.
PROG
(PARI)
A324712(n) = { my(v=0); fordiv(n, d, if(issquarefree(n/d), v=bitxor(v, A323243(d)))); (v); }; \\ Needs also code from A323243.
A000523(n) = if( n<1, 0, #binary(n) - 1); \\ From A000523
A324735(n) = { my(k=A324712(n)); if(!k, k, 1 + (A000523(k)-hammingweight(k))); };
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 17 2019
STATUS
approved