Mathematical puzzles have long been a popular method for testing and demonstrating cognitive abilities.