OFFSET
1,6
COMMENTS
FORMULA
a(n)=g(m)-g(m-2^k) where g(x)=sum(floor(x/2^i), k<i<=floor(log_2(x))), m=max(j | A001855(j)<n) and k=n-1-A001855(m). Also true: a(n)=sum(product(1-b(i), k<=i<j), k<j<=floor(log_2(m))) where b(i) is the i-th digit of the binary representation of m. Example: n=35 gives m=12 and k=1, so that m=1100 and a(n)=1-b(1)+(1-b(1))(1-b(2))=1+0=1.
EXAMPLE
a(6)=2 since 2^2 divides binomial(4,2^0)=4 and 2^3 is not a factor (here n=6 gives m=4, k=0).
a(20)=1 since 2^1 divides binomial(8,2^2)=70 and 2^2 is not a factor (here n=20 gives m=8, k=2).
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Hieronymus Fischer, May 05 2007, Sep 10 2007
STATUS
approved