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!)
A153250 Array A(x,y): A(0,0), A(1,0), A(0,1), A(2,0), A(1,1), A(0,2), ... formed by growing a bud (a single V-node) on the y-th leaf of the binary tree A014486(x). 4

%I #12 Mar 27 2015 12:04:01

%S 1,0,2,0,3,4,0,0,5,6,0,0,6,7,9,0,0,0,8,10,11,0,0,0,0,11,12,14,0,0,0,0,

%T 14,13,15,16,0,0,0,0,0,15,16,17,19,0,0,0,0,0,0,19,18,20,23,0,0,0,0,0,

%U 0,0,20,21,24,25,0,0,0,0,0,0,0,0,22,25,26,28,0,0,0,0,0,0,0,0,0,28,27,29,30

%N Array A(x,y): A(0,0), A(1,0), A(0,1), A(2,0), A(1,1), A(0,2), ... formed by growing a bud (a single V-node) on the y-th leaf of the binary tree A014486(x).

%C Note: the leaf positions are indexed so that the rightmost one in the tree is leaf 0, etc., up to the leftmost one, which is the leaf with index A072643(x). In this manner, terms on each row stay in monotone order. Row n (starting from row 0) contains A072643(n)+1 nonzero terms and then an infinite number of zeros after that. A153249 gives only the nonzero terms. Can be used to compute "fleeing tree" sequences for Catalan bijections. See comments at A153246.

%H A. Karttunen, <a href="/A153250/b153250.txt">Table of n, a(n) for n = 0..1274</a>

%e Top left corner of array:

%e 1, 0, 0, 0, 0, ...

%e 2, 3, 0, 0, 0, ...

%e 4, 5, 6, 0, 0, ...

%e 6, 7, 8, 0, 0, ...

%e 9, 10, 11, 14, 0, ...

%e 11, 12, 13, 15, 0, ...

%e 14, 15, 16, 19, 0, ...

%e By inserting a bud (\/) at leaf position 1 of binary tree A014486(2) (leaf positions numbered for clarification):

%e ....1....0

%e .....\../

%e ..2...\/

%e ...\../

%e ....\/

%e we obtain a binary tree:

%e .......

%e .\../..

%e ..\/...

%e ...\../

%e ....\/

%e .\../

%e ..\/

%e which is the 5th binary tree encoded by A014486. Thus A(2,1)=5.

%o (MIT Scheme:)

%o (define (A153250 n) (A153250bi (A002262 n) (A025581 n)))

%o (define (A153250bi x y) (A080300 (parenthesization->a014486 (bud! (A014486->parenthesization (A014486 x)) y))))

%o (define (bud! s i) (replace-n-th-leaf! s i (list (list))))

%o (define (replace-n-th-leaf! s i scion) (cond ((> i (count-pars s)) (quote ())) ((null? s) scion) (else (let ((leafs-to-visit i)) (call-with-current-continuation (lambda (exit) (let fork ((s s)) (cond ((null? (cdr s)) (if (zero? leafs-to-visit) (exit (set-cdr! s scion)) (set! leafs-to-visit (-1+ leafs-to-visit)))) (else (fork (cdr s)))) (cond ((null? (car s)) (if (zero? leafs-to-visit) (exit (set-car! s scion)) (set! leafs-to-visit (-1+ leafs-to-visit)))) (else (fork (car s))))))) s))))

%Y Cf. A002262, A025581.

%K nonn,tabl

%O 0,3

%A _Antti Karttunen_, Dec 22 2008

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 June 28 03:42 EDT 2024. Contains 373761 sequences. (Running on oeis4.)