The classic string "Hello world!" can be translated to list of characters with ascii-codes:
[72; 101; 108; 108; 111; 32; 87; 111; 114; 108; 100; 33]
Is there a mathematical function to generate this sequence of numbers (without explicitly enumerating them)?
Yes, see below but you probably do not want this. It is certainly less compact than the original list of values because you have to store more than twice the amount of data, if you want exact rational coefficients. Moreover, if you're writing a program, beware that 19531322383 does not fit in 32 bits.
http://www.wolframalpha.com/input/?i=interpolate+72+101+108+108+111+32+87+111+114+108+100+33