OFFSET
1,2
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..1023
FORMULA
a(1) = 1, a(2) = 2, after which, a(2n+1) = 1 + a(2n), a(2n) = A255411(a(n)).
EXAMPLE
This sequence can be represented as a binary tree. Apart from the 1 at root, and its children 2 and 3, from then on each left hand child is produced as A255411(n), and each right hand child as 1 + A255411(n) when parent contains n >= 2:
..................1..................
2 3
12......./ \.......13 16......./ \.......17
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
72 73 76 77 90 91 94 95
480 481 484 485 498 499 502 503 576 577 580 581 594 595 598 599
etc.
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(definec (A255567 n) (cond ((<= n 2) n) ((odd? n) (+ 1 (A255567 (- n 1)))) (else (A255411 (A255567 (/ n 2))))))
;; This for now conjectured to be equal from a(2) onward:
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 05 2015
EXTENSIONS
Edited because of the changed starting offset of A256450 - Antti Karttunen, May 30 2016
STATUS
approved