login
A257249
a(0) = 1, and for n >= 1, if A079559(n) = 0, then a(n) = 1 + a(A234017(n)), otherwise a(n) = a(A213714(n)-1).
4
1, 1, 2, 1, 2, 3, 2, 1, 2, 3, 3, 2, 4, 3, 2, 1, 2, 3, 3, 3, 4, 4, 2, 4, 3, 3, 2, 5, 4, 3, 2, 1, 2, 3, 3, 3, 4, 4, 3, 4, 4, 4, 2, 5, 5, 3, 4, 3, 5, 3, 2, 4, 4, 5, 4, 3, 3, 2, 6, 5, 4, 3, 2, 1, 2, 3, 3, 3, 4, 4, 3, 4, 4, 4, 3, 5, 5, 4, 4, 4, 5, 4, 2, 5, 5, 5, 5, 3, 3, 4, 6, 6, 4, 5, 3, 5, 4, 3, 2, 6, 4, 4, 4, 3, 5, 4, 5, 5, 6, 3, 3, 5, 2, 6, 4, 4, 5, 4, 3, 3, 2, 7, 6, 5, 4, 3, 2, 1, 2
OFFSET
0,3
COMMENTS
Because A233275(n) = A003188(n) for n = 1 .. 9, a(n) = A005811(n) for n = 1 .. 9.
LINKS
FORMULA
a(0) = 1, and for n >= 1, if A079559(n) = 0, then a(n) = 1 + a(A234017(n)), otherwise a(n) = a(A213714(n)-1).
Other identities. For all n >= 1:
a(n) = A070939(n) - A257248(n).
a(n) = A000120(A233275(n)). [Binary weight of A233275(n).]
a(n) = 1 + A256479(n) = 1 + A080791(A233277(n)).
PROG
(Scheme, alternative definitions, the first one utilizing memoizing definec-macro)
(definec (A257249 n) (if (zero? n) 1 (+ (- 1 (A079559 n)) (A257249 (if (zero? (A079559 n)) (A234017 n) (+ -1 (A213714 n)))))))
(define (A257249 n) (+ 1 (A256479 n)))
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 19 2015
STATUS
approved