cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A213704 Catalan Unranking function U(size,rank) for totally balanced binary strings (converted to decimal). Each row 'size' of an array lists all A000108(size) such items in standard lexicographic order, followed by an infinite number of zeros.

This page as a plain text file.
%I A213704 #14 Apr 13 2025 14:55:24
%S A213704 0,0,2,0,0,10,0,0,12,42,0,0,0,44,170,0,0,0,50,172,682,0,0,0,52,178,
%T A213704 684,2730,0,0,0,56,180,690,2732,10922,0,0,0,0,184,692,2738,10924,
%U A213704 43690,0,0,0,0,202,696,2740,10930,43692,174762,0,0,0,0,204,714,2744,10932,43698,174764,699050,0
%N A213704 Catalan Unranking function U(size,rank) for totally balanced binary strings (converted to decimal). Each row 'size' of an array lists all A000108(size) such items in standard lexicographic order, followed by an infinite number of zeros.
%C A213704 The Scheme-function CatalanUnrank has been adapted from Frank Ruskey's thesis. This gives essentially the same information as A014486 which can be obtained from this array by concatenating all A000108(s) nonzero terms from the beginning of each row s to one sequence.
%C A213704 See the comments and pictures at A014486 for more information.
%H A213704 Antti Karttunen, <a href="/A213704/b213704.txt">Rows n=0..54 of triangle, flattened</a>
%H A213704 Antti Karttunen et al., <a href="http://oeis.org/wiki/Ranking_and_unranking_functions">Ranking and unranking functions</a>, OEIS Wiki.
%H A213704 Frank Ruskey, <a href="http://www.cs.uvic.ca/~ruskey/Publications/Thesis/Thesis.html">Algorithmic Solution of Two Combinatorial Problems</a>, Thesis, Department of Applied Physics and Information Science, University of Victoria, 1978.
%o A213704 (Scheme)
%o A213704 (define (A213704 n) (A213704bi (A002262 n) (A025581 n)))
%o A213704 (define (A213704bi row col) (cond ((zero? row) 0) ((>= col (A000108 row)) 0) (else (CatalanUnrank row col))))
%o A213704 (define (CatalanUnrank size rank) (let loop ((a 0) (m (-1+ size)) (y size) (rank rank) (c (A009766tr (-1+ size) size))) (if (negative? m) a (if (>= rank c) (loop (1+ (* 2 a)) m (-1+ y) (- rank c) (A009766tr m (-1+ y))) (loop (* 2 a) (-1+ m) y rank (A009766tr (-1+ m) y))))))
%Y A213704 The leftmost column: A020988. For all n>1, A014486(n) = A213704bi(A072643(n),(n - A014137(A072643(n)-1))). Cf. A009766, A215406, A153250.
%K A213704 nonn,tabl
%O A213704 0,3
%A A213704 _Antti Karttunen_, Aug 10 2012