OFFSET
1,1
COMMENTS
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.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..256
Antti Karttunen, Terms a(1)-a(4096) drawn as binary strings, in Wolframesque fashion.
EXAMPLE
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:
..........
..........
..........
.\2/......
..........
..........
.\2/ \3/..
..........
..........
....\4/...
.\2/.\3/..
..........
Thus the first four terms of this sequence are 2, 12, 50 and 204.
PROG
(Scheme with memoization macro definec from Antti Karttunen's Intseq-library):
(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))))))
(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)
(define (copy-tree bt) (cond ((not (pair? bt)) bt) (else (cons (copy-tree (car bt)) (copy-tree (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
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 17 2012
STATUS
approved