login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A218614 a(n) = binary code (shown here in decimal) of the position of natural number n in the beanstalk-tree A218778. 4
1, 2, 3, 5, 7, 9, 13, 21, 29, 37, 53, 69, 101, 85, 117, 181, 245, 309, 437, 565, 821, 693, 949, 1205, 1717, 1461, 1973, 2741, 3765, 2485, 3509, 5557, 7605, 9653, 13749, 17845, 26037, 21941, 30133, 38325, 54709, 46517, 62901, 87477, 120245, 79285, 112053, 144821 (list; graph; refs; listen; history; text; internal format)
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
MIT/GNU Scheme 9.1. documentation, Function general-car-cdr
FORMULA
a(1)=1; for even n, a(n) = A004754(a(A011371(n))); for odd n, a(n) = A004755(a(A011371(n))).
EXAMPLE
As we must traverse to 4 in A218778-tree (see the example there) by first taking the left branch (car) from the root, resulting bit 1 as the least significant bit of the code, then by taking the right branch (cdr) from 3 to get to 4, resulting bit 0 as the second rightmost bit of the code, which when capped with an extra termination-one, results binary code 101, 5 in decimal, thus a(4)=5.
PROG
(Scheme with memoization macro definec): (definec (A218614 n) (cond ((< n 2) n) ((even? n) (A004754 (A218614 (A011371 n)))) (else (A004755 (A218614 (A011371 n))))))
CROSSREFS
a(n) = A054429(A218615(n)). Superset of A218790. Used to construct A218778, A218779. Cf. also A218787, A218788
Sequence in context: A240063 A216374 A240448 * A338360 A028378 A325833
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Nov 16 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 16:13 EDT 2024. Contains 371749 sequences. (Running on oeis4.)