login
A324734
Number of 0-bits present between the most and the least significant 1-bits in A324712(n), and 0 if A324712(n) = 0; a(n) = A324733(n) - A324829(n).
3
0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 2, 1, 2, 0, 0, 0, 0, 2, 2, 3, 1, 0, 0, 2, 0, 0, 0, 0, 3, 2, 2, 0, 0, 2, 2, 0, 3, 0, 0, 4, 1, 2, 2, 0, 1, 0, 4, 1, 2, 3, 1, 0, 5, 2, 1, 0, 1, 0, 2, 3, 2, 3, 1, 0, 0, 1, 5, 0, 1, 3, 3, 4, 1, 0, 1, 2, 5, 4, 5, 3, 0, 0, 0, 4, 2, 0, 4, 0, 0, 1
OFFSET
1,21
FORMULA
a(n) = A324733(n) - A324829(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
A007814(n) = valuation(n, 2)
A324829(n) = hammingweight(A324712(n));
A324733(n) = { my(k=A324712(n)); if(!k, k, 1 + (A000523(k)-A007814(k))); };
A324734(n) = (A324733(n) - A324829(n));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 17 2019
STATUS
approved