Problem 117 - Red, green and blue tiles

 - Another variation on previous 3 puzzles
 - Recursion + memoization for efficient solution