OFFSET
0,10
COMMENTS
a(n) is also the number of parts smaller than the largest part in the integer partition having viabin number n. The viabin number of an integer partition is defined in the following way. Consider the southeast border of the Ferrers board of the integer partition and consider the binary number obtained by replacing each east step with 1 and each north step, except the last one, with 0. The corresponding decimal form is, by definition, the viabin number of the given integer partition. "Viabin" is coined from "via binary". For example, consider the integer partition [2,2,2,1]. The southeast border of its Ferrers board yields 10100, leading to the viabin number 20. - Emeric Deutsch Jul 24 2017
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10000
Eric Weisstein's World of Mathematics, Binary Carry Sequence
FORMULA
EXAMPLE
a(34) = 3; indeed the binary representation of 34 is 100010, having 3 non-trailing zeros. - Emeric Deutsch Jul 24 2017
MAPLE
a := proc (n) local b, c: b := proc (n) if `mod`(n, 2) = 0 then 1+b((1/2)*n) else 0 end if end proc: c := proc (n) if n = 0 then 2 elif n = 1 then 0 elif `mod`(n, 2) = 0 then 1+c((1/2)*n) else c((1/2)*n-1/2) end if end proc: if n = 0 then 0 else c(n)-b(n) end if end proc: seq(a(n), n = 0 .. 101); # b and c are the Maple programs for A007814 and A023416, respectively. - Emeric Deutsch Jul 24 2017
MATHEMATICA
A086784[n_] := If[n == 0, 0, DigitCount[n, 2, 0] - IntegerExponent[n, 2]];
Array[A086784, 100, 0] (* Paolo Xausa, Oct 01 2024 *)
PROG
(Python)
def A086784(n): return bin(n>>(~n & n-1).bit_length())[2:].count('0') if n else 0 # Chai Wah Wu, Oct 14 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Aug 03 2003
STATUS
approved