

A244158


If n = Sum c_i * 10^i then a(n) = Sum c_i * Cat(i+1), where Cat(k) = A000108(k).


10



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, 7, 8, 9, 10, 11, 12, 13, 14, 15, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 10, 11, 12, 13, 14, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

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).
A197433 is similar, but replaces 2^k with A000108(k+1) in binary expansion of n.
For 1 and 2digit numbers the same as A156230.  R. J. Mathar, Jun 27 2014


LINKS

Table of n, a(n) for n=0..100.
Index entries for sequences related to decimal expansion of n


MAPLE

A244158 := proc(n)
local dgs, k ;
dgs := convert(n, base, 10) ;
add( op(k, dgs)*A000108(k), k=1..nops(dgs)) ;
end proc: # R. J. Mathar, Jan 31 2015


PROG

(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))))))


CROSSREFS

Cf. A000108, A014418, A244159, A197433, A244155, A244156, A244157.
Differs from A028897 and A081594 for the first time at n=100, which here is a(100) = 5.
Sequence in context: A093017 A156230 A028897 * A322001 A081594 A038506
Adjacent sequences: A244155 A244156 A244157 * A244159 A244160 A244161


KEYWORD

nonn,base,less


AUTHOR

Antti Karttunen, Jun 22 2014


STATUS

approved



