login
This site is supported by donations 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) to the yth leaf of the binary tree A014486(x). 3
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, 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, 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 (list; table; graph; refs; listen; history; internal format)
OFFSET

0,3

COMMENTS

Note: the leaf-positions are indexed so that the rightmost one in the tree is the leaf 0, et cetera, 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 non-zero terms and then infinite number of zeros after that. A153249 gives only the non-zero terms. Can be used to compute "fleeing tree" sequences for Catalan bijections. See comments at A153246.

LINKS

A. Karttunen, Table of n, a(n) for n = 0..1274

EXAMPLE

Top left corner of array:

1, 0, 0, 0, 0, ...

2, 3, 0, 0, 0, ...

4, 5, 6, 0, 0, ...

6, 7, 8, 0, 0, ...

9,10,11,14, 0, ...

11,12,13,15, 0, ...

14,15,16,19, 0, ...

By inserting a bud (\/) to the leaf-position 1 of binary tree A014486(2) (leaf-positions numbered for clarification):

....1....0

.....\../

..2...\/

...\../

....\/

we obtain a binary tree:

.......

.\../..

..\/...

...\../

....\/

.\../

..\/

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

PROG

(MIT Scheme:)

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

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

(define (bud! s i) (replace-nth-leaf! s i (list (list))))

(define (replace-nth-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))))

CROSSREFS

A002262, A025581.

Sequence in context: A112239 A021835 A112476 * A102389 A099091 A078436

Adjacent sequences:  A153247 A153248 A153249 * A153251 A153252 A153253

KEYWORD

nonn,tabl

AUTHOR

Antti Karttunen (His-Firstname.His-Surname(AT)gmail.com), Dec 22 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 16:00 EST 2012. Contains 206050 sequences.