OFFSET
0,4
COMMENTS
a(n) = 0 for those n which do not occur as the values of A082856. All positive natural numbers occur here once.
LINKS
Antti Karttunen, Alternative Catalan Orderings (with the complete Scheme source)
FORMULA
a(A082856(n)) = n for all n.
PROG
(Scheme-functions showing the essential idea. For the full source, follow the "Alternative Catalan Orderings" link.)
(define (decode-A082856-code code) (call-with-current-continuation (lambda (exit) (let recurse ((code code)) (cond ((zero? code) (list)) ((even? code) (exit '())) (else (let ((even-bits (A059905 (floor->exact (/ code 2)))) (odd-bits (A059906 (floor->exact (/ code 2))))) (cons (recurse odd-bits) (recurse even-bits)))))))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 06 2003
STATUS
approved