The Myth and Magic of Generating New Ideas

Where do ideas come from? That's a big question. Here's a smaller one: Where do mathematical ideas come from? I've wondered about this from the time I first contemplated being a mathematician until long after I officially became one. My earliest memory of anything like a mathematical idea comes from a childhood walk with my dad.