finished making it work

*added math explanation at the bottom
*simplified by adding functions
*switched from deriving palindrome mathematically to using string
reversals and concatenation
*added loop to oversee search