Perfect number-finding app using Lua