A254044 a(1) = 1, for n>1: a(n) = a(A253889(n)) + (1 if n is of the form 3n or 3n+1, otherwise 0).
1, 1, 2, 2, 1, 3, 3, 2, 3, 2, 2, 3, 2, 1, 4, 4, 3, 4, 5, 3, 3, 3, 2, 4, 3, 3, 5, 3, 2, 4, 5, 2, 2, 5, 3, 3, 4, 2, 3, 3, 1, 5, 4, 4, 4, 5, 4, 4, 4, 3, 3, 4, 4, 5, 5, 5, 5, 4, 3, 2, 3, 3, 4, 4, 3, 7, 4, 2, 3, 3, 4, 4, 3, 3, 4, 4, 3, 5, 5, 5, 6, 5, 3, 4, 5, 2, 5, 4, 4, 5, 5, 5, 5, 5, 2, 5, 7, 2, 3, 4, 5, 5, 6, 3, 6, 5, 3, 6, 3, 4, 5, 5, 2, 7, 5, 3, 5, 2, 3, 5, 7, 1, 4, 6, 5, 5, 3, 4
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..8192
Formula
a(1) = 1, for n>1: a(n) = a(A253889(n)) + [n is of the form 3n or 3n+1, i.e., in A032766] (Here [ ] is Iverson bracket).
a(1) = 0, thereafter, if n = 3k+2, then a(n) = a((n+1)/3), otherwise a(n) = 1 + a(A253889(n)).
Other identities:
a(A007051(n)) = 1 for all n >= 0. [And no 1's in any other positions.]