OFFSET
1,2
LINKS
FORMULA
PROG
(PARI) a(n) = my(L = logint(n, 2), wt = hammingweight(n), A = L + wt, m = 0); fibonacci(A+1) + sum(i=1, L, binomial(i-1, A-i)) + sum(j=0, L-1, if(bittest(n, j), m++; binomial(j, m)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Khudyakov, Sep 03 2023
STATUS
approved