

A218780


A014486codes for the compact representation of Beanstalktree, growing by two natural numbers at time, starting from the tree of one internal node (1) and two leaves (2 and 3), with the lesser numbers coming to the left hand side.


6



2, 10, 44, 180, 728, 2928, 11720, 46888, 187568, 750304, 3001232, 12004960, 48019856, 192079504, 768318048, 3073272224, 12293088960, 49172355968, 196689423936, 786757695872, 3147030783552, 12588123134528, 50352492538240, 201409970153216, 805639880612992
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

The active middle region of the triangle (see the 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 divided by two. The larger tendrils, (the finite sidetrees) 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.
These are the mirrorimages (in binary tree sense) of the terms in sequence A218782. For less compact versions, see A218776 & A218778.


LINKS

A. Karttunen, Table of n, a(n) for n = 1..256
A. Karttunen, Terms a(1)a(4096) drawn as binary strings, in Wolframesque fashion.


EXAMPLE

Illustration how the growing beanstalktree produces the first four terms of this sequence. In this "compact" variant, each successive pair of numbers ((2,3), (4,5), (6,7), etc.) adds a new bud (\/) to the beanstalk, with the lesser numbers coming to the left hand side:

..2...3...
...\./.... Coded by A014486(A218781(1)) = A014486(1) = 2 (binary 10).
....1.....

....4...5.
.....\./..
..2...3...
...\./.... Coded by A014486(A218781(2)) = A014486(2) = 10 (bin. 1010).
....1.....

..6...7...
...\./....
....4...5.
.....\./..
..2...3...
...\./.... Coded by A014486(A218781(3)) = A014486(5) = 44 (101100).
....1.....

....8...9.
.....\./..
..6...7...
...\./....
....4...5.
.....\./..
..2...3...
...\./.... Coded by A014486(A218781(4)) = A014486(12) = 180 (10110100).
....1.....

Thus the first four terms of this sequence are 2, 10, 44 and 180.


PROG

(Scheme with memoization macro definec from Antti Karttunen's Intseqlibrary):
(definec (A218780 n) (parenthesization>A014486 (tree_for_A218780 n)))(definec (tree_for_A218780 n) (cond ((zero? n) (list)) ((= 1 n) (list (list))) (else (let ((newtree (copytree (tree_for_A218780 (1+ n))))) (addbudforthenthunbranchingtreewithcarcdrcode! newtree (A218791 n))))))
(define (addbudforthenthunbranchingtreewithcarcdrcode! tree n) (let loop ((n n) (t tree)) (cond ((zero? n) (list)) ((= n 1) (list (list))) ((= n 2) (setcdr! t (list (list)))) ((= n 3) (setcar! t (list (list)))) ((even? n) (loop (/ n 2) (cdr t))) (else (loop (/ ( n 1) 2) (car t))))) tree)
(define (copytree bt) (cond ((not (pair? bt)) bt) (else (cons (copytree (car bt)) (copytree (cdr bt))))))
(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))))))
(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).


CROSSREFS

a(n) = A014486(A218781(n)). Cf. A014486, A218791, A218776, A218778, A218782, A218787.
Sequence in context: A122932 A080069 A243965 * A068551 A099919 A100397
Adjacent sequences: A218777 A218778 A218779 * A218781 A218782 A218783


KEYWORD

nonn


AUTHOR

Antti Karttunen, Nov 17 2012


STATUS

approved



