login
a(n) is the minimal i such that A000108(i) > n.
9

%I #18 Mar 25 2021 10:22:40

%S 0,2,3,3,3,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,

%T 5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,

%U 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6

%N a(n) is the minimal i such that A000108(i) > n.

%C Apart from the initial term 0, each n occurs A000245(n-1) times.

%o (Python)

%o from sympy import catalan

%o def a(n):

%o if n==0: return 0

%o i=1

%o while True:

%o if catalan(i)>n: return i

%o else: i+=1

%o print([a(n) for n in range(101)]) # _Indranil Ghosh_, Jun 08 2017

%o (PARI) A081288(n) = my(i=0); while(binomial(2*i, i)/(i+1) <= n, i++); i; \\ _Michel Marcus_, Apr 28 2020

%Y Cf. A000108, A000245, A072643, A081289, A081290. Used to compute A081291.

%K nonn

%O 0,2

%A _Antti Karttunen_, Mar 17 2003