I assuming that your 16 digit numbers are in base 10 (i.e. decimal numbers) then as implied by MoreFeo, Bong and tom62 above you could use converting from base 10 to a higher base (e.g. 16,64,256,... 1000) as a method of reducing the number of digits required to represent your numbers.
I found this problem interesting and had a further look and gathered some thoughts below. Please accept my apologies if i repeat the same things as the others in this thread have already pointed out.
Converting a decimal number to base 256
An unsigned long number has 64 bits (on a 32 bit platform). So the biggest unsigned (i.e. positive) decimal number than can be stored in an unsigned long is: (2^64)-1=18,446,744,073,709,551,615.If you count the digits of this biggest number you will see that there are 20 digits. Your decimal numbers have 16 digits so they are well within the above range be able to be stored in an unsigned long. In fact you could even use simply long (signed) if you are also dealing with negative numbers. So if you represent an input number using a long variabe as suggested by tom62 you could then simply retreive each byte of of the long variable and then treat the symbol(character) it represents as a single digit. However this would give you up to 8 digits so i guess it is not good for you as you are requested to have 6.
The biggest 16 digit decimal number 9999,9999,9999,9999 in hexadecimal base would be 23 86 F2 6F C0 FF FF (so it would require 7 bytes). Therefore the above method can only be used if your task was to convert the numbers on up to 7 digit, or if your numbers were less than 2^48 and greater than zero which would all fit into 6 bytes.
The above method could be seen as a method of converting numbers from base 10 to base 256 (i.e. from a number base where only 10 symbols (digits) exist to a number base where 256 symbols(digits) exist)
Converting a decimal number to base 4096
However if you group the hexadecimal digits of the max number above into groups of 3 you would get 023 86F 26F C0F FFF and then treat each group as a single digit then you have max of 5 digits (giving you one reserve symbol for the number sign should you need it). You can then try to use the method suggested by MoreFeo and create one single symbol for each group. This has the downside of you having to somehow have 2^12=4096 symbols (perhaps by mapping to 4096) characters.
The above could be seen as a method of converting numbers from base 10 to base 4096 (i.e. from a number base where only 10 symbols (digits) exist to a number base where 4096 symbols(digits) exist).
Converting a decimal number to base 65536
In fact you could group them into groups of four and then you would have 0023 86F2 6FC0 FFFF. If you then treat each group as one digit then you could represent each of your 16 digit numbers with maximum 4 digits only. Similarly here you have to choose a set of symbols. Because each group is 2 bytes you could use unicode characters as your symbols. So each group would be represented by a single unicode character. (There are 2^16=65536 unicode characters)
Choosing smallest possible base to convert to
I am not sure if any of the above provide you with a method towards the solution that you require however they did raise a question in my mind. "What is the smallest base required to represent a 16 digits decimal number into a 6 digit number?" Certainly converting to base 65536 or 4069 would do the trick but could there be a smaller number base that would work just as well. Choosing a smaller base will reduce the number of symbols required and therefore choosing the smallest possible base is perhaps the most elegant solution. The answer to this question may be found by first solving the following equation: X^6 = 10^16
X^6 = 10^16
X = 10^(16/6)
X = 464.159
So the smallest base we could probably choose would be 465. So you will need at least 465 different symbols to convert a 16 digit decimal number into a 6 (465mal) digit number. Algorithms for converting from one base to another are simple and you should be able to work out by looking at some sample.
I hope the above helps (or at least I hope it does not lead to the wrong direction).
Good luck
"It is in our collective behaviour that we are most mysterious" Lewis Thomas