This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A244158 #21 Jan 31 2015 12:14:39 %S A244158 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 A244158 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 A244158 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 A244158 If n = Sum c_i * 10^i then a(n) = Sum c_i * Cat(i+1), where Cat(k) = A000108(k). %C A244158 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 A244158 A197433 is similar, but replaces 2^k with A000108(k+1) in binary expansion of n. %C A244158 For 1- and 2-digit numbers the same as A156230. - _R. J. Mathar_, Jun 27 2014 %H A244158 <a href="/index/De#decimal_expansion">Index entries for sequences related to decimal expansion of n</a> %p A244158 A244158 := proc(n) %p A244158 local dgs,k ; %p A244158 dgs := convert(n,base,10) ; %p A244158 add( op(k,dgs)*A000108(k),k=1..nops(dgs)) ; %p A244158 end proc: # _R. J. Mathar_, Jan 31 2015 %o A244158 (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 A244158 Cf. A000108, A014418, A244159, A197433, A244155, A244156, A244157. %Y A244158 Differs from A028897 and A081594 for the first time at n=100, which here is a(100) = 5. %K A244158 nonn,base,less %O A244158 0,3 %A A244158 _Antti Karttunen_, Jun 22 2014