0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3
Offset: 0
Using the formula a(n) = a(floor(n / floor_pow4(n))) + a(n mod floor_pow4(n)):
a(4) = a(1) + a(0) = 1,
a(8) = a(2) + a(0) = 1,
a(13) = a(3) + a(1) = 2 + 1 = 3,
a(23) = a(1) + a(7) = 1 + a(1) + a(3) = 1 + 1 + 2 = 4.
_Gary W. Adamson_ points out (Jun 03 2009) that this can be written as a triangle:
0,
1,
1,2,
1,2,2,3,
1,2,2,3,2,3,3,4,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
1,2,2,3,2,3,...
where the rows converge to A063787.
From _Joerg Arndt_, Nov 09 2012: (Start)
Connection to the compositions of n as lists of parts (see comment):
[ #]: a(n) composition
[ 0]: [0] 1 1 1 1 1
[ 1]: [1] 1 1 1 2
[ 2]: [1] 1 1 2 1
[ 3]: [2] 1 1 3
[ 4]: [1] 1 2 1 1
[ 5]: [2] 1 2 2
[ 6]: [2] 1 3 1
[ 7]: [3] 1 4
[ 8]: [1] 2 1 1 1
[ 9]: [2] 2 1 2
[10]: [2] 2 2 1
[11]: [3] 2 3
[12]: [2] 3 1 1
[13]: [3] 3 2
[14]: [3] 4 1
[15]: [4] 5
(End)
Comments