title: Efficient algorithm for conversion between numeral system
body: <p>Is there any efficient algorithm for conversion between numeral system when the size of source integer is arbitrary?</p>
  
  <p>For example, assume that there is an integer array {1, 4, 8} which is 148 in decimal format as an input. It might be converted to {9, 4} in hexadecimal format, or {2, 2, 4} in octal, or {1, 0, 0, 1, 0, 1, 0, 0} in binary format, or just {148} in 1234-ary format or something.</p>
  
  <p>It's simple when the actual value can be expressed in word-size supported by machine. But when it goes to arbitrary size, I cannot find efficient way better than O(n^2).</p>