I am generally a decent neighbor in my apartment building - I smile, say thanks when someone holds the door open for me, slip mail under someone else's door if I get it by accident. Unfortunately, I've worked myself into a tricky situation with my next-door neighbor. He introduced himself to me a while back, but I can't remember his name - at all. I remember that he works in psychology and probably thinks I'm insane, but I don't remember his name, and I have seen him many, many times. I feel lame, saying, "Hey," since a personalized, "Good morning, [insert name here]," is much warmer and thus more neighborly. I don't need to be BFF with him, but I do feel I'm remiss in not knowing my neighbor's name. In fact, I've been driven to hiding in the frozen foods aisle of the nearby supermarket when I see my neighbor there because I dread chatting with him for fifteen minutes, not knowing his name. Should I try to break into his mailbox to see who his mail is addressed to? Do I carry around my stuffed animal bird, asking people to introduce themselves to him? Or do I continue to dodge him until I get hypnotized to recall what his name is?
And, also, what do I do about the neighbor who smokes cigars? Do I continue to having coughing fits in the hall when I pass his door? Do I slip information about the hazards of smoking under his door? Do I tell his wife she reeks of cigar smoke?
Short of looking over his shoulder the next time he gets his mail or hoping one of your other neighbors glides by one day and says, "Oh, hey, Steve!" there really isn't a tactful way to find out your neighbor's name without asking him. In the meantime, there isn't really a need to avoid him. Sure, it's polite to address people by name in conversation, but it's also possible to carry on a casual conversation without referring to the person you're talking to by name.
It might be a little embarassing to drop the, "This is so silly, but I can't remember your name!" but your neighbor probably won't admonish you too much. He may even be flattered that you're taking the time to be more neighborly.
As for the smoking, if it really bothers you, you should say something to the neighbor. Subtle hints at the wife about how she should tune down the eau de tobacco probably aren't the way to go. We have a cigar-smoking neighbor, too, but we feigned an allergy and he only smokes outside now.
See also Ask Gothamist on forgetting the name of a co-worker.