login
A256479
a(1) = 0, and for n > 1, if A079559(n) = 0, then a(n) = 1 + a(A234017(n)), otherwise a(n) = a(A213714(n)-1).
6
0, 1, 0, 1, 2, 1, 0, 1, 2, 2, 1, 3, 2, 1, 0, 1, 2, 2, 2, 3, 3, 1, 3, 2, 2, 1, 4, 3, 2, 1, 0, 1, 2, 2, 2, 3, 3, 2, 3, 3, 3, 1, 4, 4, 2, 3, 2, 4, 2, 1, 3, 3, 4, 3, 2, 2, 1, 5, 4, 3, 2, 1, 0, 1, 2, 2, 2, 3, 3, 2, 3, 3, 3, 2, 4, 4, 3, 3, 3, 4, 3, 1, 4, 4, 4, 4, 2, 2, 3, 5, 5, 3, 4, 2, 4, 3, 2, 1, 5, 3, 3, 3, 2, 4, 3, 4, 4, 5, 2, 2, 4, 1, 5, 3, 3, 4, 3, 2, 2, 1, 6, 5, 4, 3, 2, 1, 0, 1
OFFSET
1,5
COMMENTS
a(n) tells how many terms of A055938 are encountered when traversing toward the root of binary tree A233276, starting from the node containing n. This count includes also n in case it itself is a term of A055938. See also comments in A256478 and A256991.
LINKS
FORMULA
a(1) = 0, and for n > 1, if A079559(n) = 0, then a(n) = 1 + a(A234017(n)), otherwise a(n) = a(A213714(n)-1).
a(n) = A080791(A233277(n)). [Number of nonleading zeros in the binary representation of A233277(n).]
Other identities. For all n >= 1:
a(n) = A257249(n) - 1 = A000120(A233275(n)) - 1.
a(n) = A070939(n) - A256478(n).
a(A000225(n)) = 0.
PROG
(Scheme, with memoization-macro definec)
(definec (A256479 n) (if (<= n 1) 0 (+ (- 1 (A079559 n)) (A256479 (if (zero? (A079559 n)) (A234017 n) (+ -1 (A213714 n)))))))
;; Alternative definitions:
(define (A256479 n) (A080791 (A233277 n)))
(define (A256479 n) (+ -1 (A000120 (A233275 n))))
CROSSREFS
One less than A257249.
Cf. also A000225 (gives the positions zeros).
Sequence in context: A025861 A090723 A027357 * A277078 A283715 A078808
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 15 2015
STATUS
approved