Nothing Special   »   [go: up one dir, main page]

login
Search: a218777 -id:a218777
     Sort: relevance | references | number | modified | created      Format: long | short | data
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.
+10
6
2, 12, 50, 204, 818, 3298, 13202, 52834, 211346, 845586, 3382418, 13531282, 54125714, 216503058, 866012306, 3464049426, 13856197778, 55424792722, 221699171474, 886796698770, 3547186799762, 14188747200658, 56754988803218, 227019955225746, 908079820907666
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.
These are the mirror-images (in binary tree sense) of the terms in sequence A218778. For more compact versions, see A218780 & A218782.
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:
..........
...\1/.... Coded by A014486(A218777(1)) = A014486(1) = 2 (binary 10).
..........
..........
.\2/......
...\1/.... Coded by A014486(A218777(2)) = A014486(3) = 12 (bin. 1100).
..........
..........
.\2/ \3/..
...\1/.... Coded by A014486(A218777(3)) = A014486(6) = 50 (110010).
..........
..........
....\4/...
.\2/.\3/..
...\1/.... Coded by A014486(A218777(4)) = A014486(15) = 204 (11001100).
..........
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 (A218776 n) (parenthesization->A014486 (tree_for_A218776 n)))
(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
A014486-indices 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 right hand side" construction.
+10
6
1, 2, 6, 16, 53, 156, 491, 1584, 5286, 17855, 61405, 214012, 754731, 2688307, 9659023, 34947356, 127260566, 465920651, 1714294995, 6335423798, 23506865260, 87534068725, 327024845325, 1225395355165, 4604242172697, 17343284212635, 65480496260109, 247755060623522
OFFSET
1,2
COMMENTS
See comments and examples at A218778.
LINKS
FORMULA
a(n) = A080300(A218778(n)).
a(n) = A057163(A218777(n)).
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 17 2012
STATUS
approved
A014486-indices for the compact representation of Beanstalk-tree, with the lesser numbers coming to the left hand side.
+10
6
1, 2, 5, 12, 32, 92, 278, 877, 2861, 9572, 32656, 113164, 397190, 1409006, 5043617, 18194197, 66075777, 241385044, 886422017, 3270283189, 12115355601, 45052126049, 168100964161, 629171367473, 2361546968519, 8886942571534, 33523357596518, 126736969302857
OFFSET
1,2
COMMENTS
See the comments and examples at A218780.
LINKS
FORMULA
a(n) = A080300(A218780(n)).
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 17 2012
STATUS
approved
A014486-indices for the compact representation of Beanstalk-tree, with the lesser numbers coming to the right hand side.
+10
5
1, 3, 7, 18, 49, 142, 438, 1405, 4630, 15595, 53493, 186112, 655421, 2331057, 8362451, 30222369, 109930284, 402134685, 1478480102, 5460253675, 20247271086, 75353895375, 281374686795, 1053846512655, 3957966801068, 14902939174394, 56245902561309, 212741751056939
OFFSET
1,2
COMMENTS
See the comments and examples at A218782.
LINKS
FORMULA
a(n) = A080300(A218782(n)).
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 17 2012
STATUS
approved
a(n) = binary code (shown here in decimal) of the position of natural number n in the beanstalk-tree A218776.
+10
4
1, 3, 2, 6, 4, 14, 10, 26, 18, 58, 42, 122, 90, 106, 74, 202, 138, 458, 330, 970, 714, 842, 586, 1866, 1354, 1610, 1098, 3402, 2378, 3658, 2634, 6730, 4682, 14922, 10826, 31306, 23114, 27210, 19018, 59978, 43594, 51786, 35402, 109130, 76362, 117322, 84554, 248394
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 odd n, a(n) = A004754(a(A011371(n))), for even n, a(n) = A004755(a(A011371(n))).
EXAMPLE
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.
PROG
(Scheme with memoization macro definec): (definec (A218615 n) (cond ((< n 2) n) ((odd? n) (A004754 (A218615 (A011371 n)))) (else (A004755 (A218615 (A011371 n))))))
CROSSREFS
a(n) = A054429(A218614(n)). Superset of A218791. Used to construct A218776, A218777. Cf. also A179016, A218787, A218788
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Nov 16 2012
STATUS
approved

Search completed in 0.006 seconds