%I #21 Jan 31 2015 12:14:39
%S 0,1,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,10,11,4,5,6,7,8,9,10,11,12,13,6,
%T 7,8,9,10,11,12,13,14,15,8,9,10,11,12,13,14,15,16,17,10,11,12,13,14,
%U 15,16,17,18,19,12,13,14,15,16,17,18,19,20,21,14,15,16,17,18,19,20,21,22,23,16,17,18,19,20,21,22,23,24,25,18,19,20,21,22,23,24,25,26,27,5
%N If n = Sum c_i * 10^i then a(n) = Sum c_i * Cat(i+1), where Cat(k) = A000108(k).
%C This sequence converts any number from various "Catalan Base number systems" (when represented as decimal numbers) back to the integer the numeral represents: e.g. we have a(A014418(n)) = n and a(A244159(n)) = n (except for the latter this is eventually broken by the shortcomings of the decimal representation used, while for the former it works for all n, because no digits larger than 3 will ever appear in the terms of A014418).
%C A197433 is similar, but replaces 2^k with A000108(k+1) in binary expansion of n.
%C For 1- and 2-digit numbers the same as A156230. - _R. J. Mathar_, Jun 27 2014
%H <a href="/index/De#decimal_expansion">Index entries for sequences related to decimal expansion of n</a>
%p A244158 := proc(n)
%p local dgs,k ;
%p dgs := convert(n,base,10) ;
%p add( op(k,dgs)*A000108(k),k=1..nops(dgs)) ;
%p end proc: # _R. J. Mathar_, Jan 31 2015
%o (MIT/GNU Scheme) (define (A244158 n) (let loop ((z 0) (i 1) (n n)) (if (zero? n) z (loop (+ z (* (modulo n 10) (A000108 i))) (1+ i) (floor->exact (/ n 10))))))
%Y Cf. A000108, A014418, A244159, A197433, A244155, A244156, A244157.
%Y Differs from A028897 and A081594 for the first time at n=100, which here is a(100) = 5.
%K nonn,base,less
%O 0,3
%A _Antti Karttunen_, Jun 22 2014
|