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!)
A218615 a(n) = binary code (shown here in decimal) of the position of natural number n in the beanstalk-tree A218776. 4

%I #15 Mar 28 2014 23:43:37

%S 1,3,2,6,4,14,10,26,18,58,42,122,90,106,74,202,138,458,330,970,714,

%T 842,586,1866,1354,1610,1098,3402,2378,3658,2634,6730,4682,14922,

%U 10826,31306,23114,27210,19018,59978,43594,51786,35402,109130,76362,117322,84554,248394

%N a(n) = binary code (shown here in decimal) of the position of natural number n in the beanstalk-tree A218776.

%C 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.

%H A. Karttunen, <a href="/A218615/b218615.txt">Table of n, a(n) for n = 1..1024</a>

%H MIT/GNU Scheme 9.1. documentation, <a href="http://www.gnu.org/software/mit-scheme/documentation/mit-scheme-ref/Pairs.html#index-general_002dcar_002dcdr-1159">Function general-car-cdr</a>

%F a(1)=1, for odd n, a(n) = A004754(a(A011371(n))), for even n, a(n) = A004755(a(A011371(n))).

%e 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.

%o (Scheme with memoization macro definec): (definec (A218615 n) (cond ((< n 2) n) ((odd? n) (A004754 (A218615 (A011371 n)))) (else (A004755 (A218615 (A011371 n))))))

%Y a(n) = A054429(A218614(n)). Superset of A218791. Used to construct A218776, A218777. Cf. also A179016, A218787, A218788

%K nonn,base

%O 1,2

%A _Antti Karttunen_, Nov 16 2012

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 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)