A Function That Creates "Hello World!"

269 Views Asked by At

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

2

There are 2 best solutions below

9
On BEST ANSWER

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.

enter image description here

http://www.wolframalpha.com/input/?i=interpolate+72+101+108+108+111+32+87+111+114+108+100+33

1
On

A -likely- nonexpected answer provides the following link. However, the resulting formula is much more messy than the interpolation-formula...
See http://www.xamuel.com/inverse-graphing-calculator.php?phrase=Hello+World and have fun...