Lua: problem 11

Took about 2 minutes to write and 2 years to debug, lol
Python: problem 13

Arbitrary precision yay
Python: problems 16, 40

Not efficient but pretty concise. I'm starting to like Python.