login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A244160 a(0)=0, and for n >= 1, a(n) = the largest k such that k-th Catalan number <= n. 11
0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Apart from 0, each n occurs A000245(n) times.

For n >= 1, a(n) gives the largest k such that C(k) <= n, where C(k) stands for the k-th Catalan number, A000108(k).

LINKS

Michael De Vlieger, Table of n, a(n) for n = 0..4861

FORMULA

a(0) = 0, and for n>=1, a(n) = A081288(n)-1.

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

EXAMPLE

For n=1, the largest k such that C(k) <= 1 is 1, thus a(1) = 1.

For n=2, the largest k such that C(k) <= 2 is 2, thus a(2) = 2.

For n=3, the largest k such that C(k) <= 3 is 2, thus a(3) = 2.

For n=4, the largest k such that C(k) <= 4 is 2, thus a(4) = 2.

For n=5, the largest k such that C(k) <= 5 is 3, thus a(5) = 3.

MATHEMATICA

MapIndexed[ConstantArray[First@ #2 - 1, #1] &, Differences@ Array[CatalanNumber, 8, 0]] /. {} -> {0} // Flatten (* Michael De Vlieger, Jun 08 2017 *)

PROG

(Scheme) (define (A244160 n) (if (zero? n) n (- (A081288 n) 1)))

(Python)

from sympy import catalan

def a(n):

    if n==0: return 0

    i=1

    while True:

        if catalan(i)>n: break

        else: i+=1

    return i - 1

print [a(n) for n in range(0, 101)] # Indranil Ghosh, Jun 08 2017

CROSSREFS

After zero, one less than A081288.

Cf. A000108, A000245, A081290, A014418, A239903, A244215, A244159, A236859, A126307.

Sequence in context: A086673 A101787 A269024 * A064099 A134021 A330558

Adjacent sequences:  A244157 A244158 A244159 * A244161 A244162 A244163

KEYWORD

nonn

AUTHOR

Antti Karttunen, Jun 23 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 3 23:48 EDT 2020. Contains 333207 sequences. (Running on oeis4.)