OFFSET
1,2
COMMENTS
The binary code is the same as used by function general-car-cdr of MIT/GNU Scheme: a zero bit represents a cdr operation (taking the right hand side branch in the binary tree), and a one bit represents a car (taking the left hand side branch in the binary tree). The bits are interpreted from LSB to MSB, and the most significant one bit, rather than being interpreted as an operation, signals the end of the binary code.
LINKS
A. Karttunen, Table of n, a(n) for n = 1..1024
MIT/GNU Scheme 9.1. documentation, Function general-car-cdr
FORMULA
EXAMPLE
As we can traverse to 4 in A218776-tree (see the example there) by taking first the right branch (cdr) from the root, resulting bit 0 as the least significant bit of the code, then by taking the left branch (car) from 3 to get to 4, resulting bit 1 as the second rightmost bit of the code, which when capped with an extra termination-one, results binary code 110, 6 in decimal, thus a(4)=6.
PROG
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Nov 16 2012
STATUS
approved