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!)
A218776 A014486-codes for the Beanstalk-tree growing one natural number at time, starting from the tree of one internal node (1), with the "lesser numbers to the left hand side" construction. 6

%I #12 Nov 02 2014 12:18:35

%S 2,12,50,204,818,3298,13202,52834,211346,845586,3382418,13531282,

%T 54125714,216503058,866012306,3464049426,13856197778,55424792722,

%U 221699171474,886796698770,3547186799762,14188747200658,56754988803218,227019955225746,908079820907666

%N A014486-codes for the Beanstalk-tree growing one natural number at time, starting from the tree of one internal node (1), with the "lesser numbers to the left hand side" construction.

%C The active middle region of the triangle (see attached "Wolframesque" illustration) corresponds to the area where the growing tip(s) of the beanstalk are located. Successively larger "turbulences" occurring in that area appear approximately at the row numbers given by A218548. The larger tendrils (the finite side-trees) are, the longer there is vacillation in the direction of the growing region, which lasts until the growing tip of the infinite stem (A179016) has passed the topmost tips of the tendril. See also A218612.

%C These are the mirror-images (in binary tree sense) of the terms in sequence A218778. For more compact versions, see A218780 & A218782.

%H Antti Karttunen, <a href="/A218776/b218776.txt">Table of n, a(n) for n = 1..256</a>

%H Antti Karttunen, <a href="/A218776/a218776.png">Terms a(1)-a(4096) drawn as binary strings, in Wolframesque fashion.</a>

%e Illustration how the growing beanstalk-tree produces the first four terms of this sequence. In this variant, the lesser numbers come to the left hand side:

%e ..........

%e ...\1/.... Coded by A014486(A218777(1)) = A014486(1) = 2 (binary 10).

%e ..........

%e ..........

%e .\2/......

%e ...\1/.... Coded by A014486(A218777(2)) = A014486(3) = 12 (bin. 1100).

%e ..........

%e ..........

%e .\2/ \3/..

%e ...\1/.... Coded by A014486(A218777(3)) = A014486(6) = 50 (110010).

%e ..........

%e ..........

%e ....\4/...

%e .\2/.\3/..

%e ...\1/.... Coded by A014486(A218777(4)) = A014486(15) = 204 (11001100).

%e ..........

%e Thus the first four terms of this sequence are 2, 12, 50 and 204.

%o (Scheme with memoization macro definec from _Antti Karttunen_'s Intseq-library):

%o (definec (A218776 n) (parenthesization->A014486 (tree_for_A218776 n)))

%o (definec (tree_for_A218776 n) (cond ((zero? n) (list)) ((= 1 n) (list (list))) (else (let ((new-tree (copy-tree (tree_for_a218776 (-1+ n))))) (add-bud-for-the-n-th-unbranching-tree-with-car-cdr-code! new-tree (A218615 n))))))

%o (define (add-bud-for-the-n-th-unbranching-tree-with-car-cdr-code! tree n) (let loop ((n n) (t tree)) (cond ((zero? n) (list)) ((= n 1) (list (list))) ((= n 2) (set-cdr! t (list (list)))) ((= n 3) (set-car! t (list (list)))) ((even? n) (loop (/ n 2) (cdr t))) (else (loop (/ (- n 1) 2) (car t))))) tree)

%o (define (copy-tree bt) (cond ((not (pair? bt)) bt) (else (cons (copy-tree (car bt)) (copy-tree (cdr bt))))))

%o (define (parenthesization->a014486 p) (let loop ((s 0) (p p)) (if (null? p) s (let* ((x (parenthesization->a014486 (car p))) (w (binwidth x))) (loop (+ (* s (expt 2 (+ w 2))) (expt 2 (1+ w)) (* 2 x)) (cdr p))))))

%o (define (binwidth n) (let loop ((n n) (i 0)) (if (zero? n) i (loop (floor->exact (/ n 2)) (1+ i))))) ;; (binwidth n) = A029837(n+1).

%Y a(n) = A014486(A218777(n)). Cf. A014486, A218615, A218780, A218782, A218787, A218778.

%K nonn

%O 1,1

%A _Antti Karttunen_, Nov 17 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 17 20:17 EDT 2024. Contains 371767 sequences. (Running on oeis4.)