OFFSET
0
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..4862
PROG
(Python)
from sympy import catalan
def a244160(n):
if n==0: return 0
i=1
while True:
if catalan(i)>n: break
else: i+=1
return i - 1
def a(n):
if n==0: return 0
x=a244160(n)
return 10**(x - 1) + a(n - catalan(x))
print([1 - a(n)%2 for n in range(101)]) # Indranil Ghosh, Jun 08 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 23 2014
STATUS
approved