login
A256991
If A079559(n) = 1, a(n) = A213714(n) - 1, otherwise a(n) = A234017(n).
9
0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 5, 6, 7, 7, 8, 8, 9, 10, 9, 10, 11, 12, 11, 13, 14, 12, 13, 14, 15, 15, 16, 16, 17, 18, 17, 18, 19, 20, 19, 21, 22, 20, 21, 22, 23, 24, 23, 25, 26, 24, 25, 27, 28, 26, 29, 30, 27, 28, 29, 30, 31, 31, 32, 32, 33, 34, 33, 34, 35, 36, 35, 37, 38, 36, 37, 38, 39, 40, 39, 41, 42, 40, 41, 43, 44, 42
OFFSET
1,4
COMMENTS
In other words, if n = A005187(k) for some k >= 1, then a(n) = k-1, otherwise it must be that n = A055938(h) for some h, and then a(n) = h.
In binary trees like A233276 and A233278, a(n) gives the contents at the parent node of node containing n, for any n >= 1.
When iterating a(n), a(a(n)), a(a(a(n))), and so on, A070939(n) = A256478(n) + A256479(n) = A257248(n) + A257249(n) gives the number of steps needed to reach zero, from any starting value n >= 1.
LINKS
FORMULA
If A079559(n) = 1, a(n) = A213714(n) - 1, otherwise a(n) = A234017(n).
a(n) = A256992(n) - A079559(n) = A213714(n) + A234017(n) - A079559(n).
PROG
(Scheme) (define (A256991 n) (if (not (zero? (A079559 n))) (+ -1 (A213714 n)) (A234017 n)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 15 2015
STATUS
approved