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.

A244215 a(0)=0, and for n>=1, if n is the k-th Catalan number (A000108(k)), a(n) = k, otherwise the difference of the indices of the two largest Catalan numbers whose sum is less than or equal to n: a(n) = A244160(n) - A244160(n-A081290(n)).

Original entry on oeis.org

0, 1, 2, 1, 0, 3, 2, 1, 1, 1, 0, 0, 0, 0, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6
Offset: 0

Views

Author

Antti Karttunen, Jun 23 2014

Keywords

Comments

After a(0), if the leftmost digit in the Greedy Catalan Base representation of n [= A014418(n)] is larger than 1, then a(n) = 0, otherwise one more than the distance to the next nonzero digit to the right, or to the end of the numeral, if no more nonzero digits are present (i.e., if n is one of the Catalan numbers).
When searching for the two largest Catalan numbers whose sum is less than or equal to n, we first maximize the larger of those two numbers, which is A081290(n) = A000108(A244160(n)), after which we will find the next largest Catalan number that still "fits into" n. - Antti Karttunen, Mar 21 2015

Crossrefs

A244216 gives the positions of zeros, A244217 the positions of nonzero terms.

Programs

Formula

a(n) = A244160(n) - A244160(n-A081290(n)).
For all n >= 1, a(A000108(n)) = n.

Extensions

Name improved by Antti Karttunen, Mar 21 2015