A244157 a(n) = difference between n and the n-th Catalan restricted growth string [b_k, b_{k-1}, ..., b_2, b_1] (see A239903) when it is viewed as a simple numeral in Catalan Base: b_k*C(k) + b_{k-1}*C(k-1) + ... + b_2*C(2) +b_1*C(1). Here C(m) = A000108(m).
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 4, 4, 4, 4, 4, 5, 5, 5, 5, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 4, 4, 4, 4, 4, 5, 5, 5, 5, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 18
Offset: 0
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 0..16796
Crossrefs
Programs
Formula
a(n) = n - A244158(A239903(n)) up to 58784, after which the "digits" in Catalan restricted growth strings grow larger than 9 and their decimal representation used in A239903 starts corrupting the results.
At n=58785 (= C(11)-1, where C(k) = the k-th Catalan number, A000108(k)), the correct value for this sequence is a(58785) = 58785 - ((1*C(10)) + (2*C(9)) + (3*C(8)) + (4*C(7)) + (5*C(6)) + (6*C(5)) + (7*C(4)) + (8*C(3)) + (9*C(2)) + (10*C(1))) = 25181.