A369900 a(n) is twice the sum of the first n binary digits of e minus n.
0, 1, 0, 1, 0, 1, 2, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 4, 3, 4, 3, 4, 3, 2, 1, 2, 1, 2, 3, 2, 1, 0, 1, 0, 1, 0, -1, -2, -1, -2, -1, -2, -1, 0, 1, 0, 1, 2, 1, 2, 1, 0, 1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 4, 5, 6, 5, 6, 7, 8, 7, 6, 5, 6, 5, 6
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..20000
Formula
a(0) = 0, a(n) = a(n-1) + 2*A004593(n+1) - 1 for n>=1.
Comments