OFFSET
1,3
COMMENTS
Also, a(n) = the number of times a number whose binary expansion begins with 10... (cf. A004754) is encountered when iterating from 2^(n+2)-2 to (2^(n+1))-2 with the map x -> x - (number of runs in binary representation of x), i.e., with m(n) = A236840(n). For example, when starting from the initial value (2^(4+2))-2 = 62, we get m(62) = 60, m(60) = 58, m(58) = 54, m(54) = 50, m(50) = 46, m(46) = 42, m(42) = 36 and finally m(36) = 32, which is (2^(4+1)). Of the nine numbers encountered, only 46, 42, 36 and 32 (in binary: 101110, 101010, 100100 and 100000) are in A004754, thus a(4) = 5.
FORMULA
PROG
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 21 2015
STATUS
approved