add common catalan formula generation