login
A365396
Inverse permutation to A243571.
0
1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 13, 11, 14, 15, 21, 12, 16, 17, 22, 18, 23, 24, 34, 19, 25, 26, 35, 27, 36, 37, 55, 20, 28, 29, 38, 30, 39, 40, 56, 31, 41, 42, 57, 43, 58, 59, 89, 32, 44, 45, 60, 46, 61, 62, 90, 47, 63, 64, 91, 65, 92, 93, 144, 33, 48, 49, 66
OFFSET
1,2
FORMULA
a(n) = A000045(b(n) + 1) + Sum_{i=1..A000523(n)} binomial(i-1, b(n) - i) + Sum_{j=1..A000120(n) - 1} binomial(A133457(n, j), j) where b(n) = A056792(n).
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