Is it appropriate to email a professor during summer for a difficult question? Tl; dr : Does a math professor get annoyed or think of it as a waste of time if he is emailed a difficult math question from an undergraduate student whom he is fairly acquianted with? Or is he ok with it?

I am currently an undergraduate at an U.S. university. I have taken two math courses with a pretty renowned (though not world-famous, though I might be wrong) and super-nice (i.e. very kind and skillful both in teaching and in math itself) professor in the past, got A's on both, and am also decently acquianted with the professor (I went to lots of office hours while taking the course). I am self-studying a math topic (set theory) he should be very familiar with (he is a tenured logic professor, and logic and set theory often go hand in hand). I recently came across a question on the math topic that's hard to answer, and wanted to email the professor about how to solve the problem. However, I am afriad that the professor might think of my question as a nuisance  / waste of his time, especially since he might well be busy (he's tenured professor at a university that is ranked wihin top 5 in the world in mathematical logic, so he might have lots of conferences/research/meetings/etc). I don't want to be a bother for him in any way, but I think he can help me solve this rather difficult question. Should I email him or not? The last time I took a course with him was like February 2018...

In general, how do professors react to this? If you are a professor (who is not someone who doesn't care about students) please comment below. Are they annoyed, or are they ok with it/delighted? What if they are busy?

Please gear this toward summer! Lots of people may relax during summer so it might be different... Also I am not sure if this is relevant but he doesn't have a family (i.e. single) and is like age 42 or something...

I emailed a different professor once about a math question and his reaction seemed to be "I'm annoyed".. I actually wrote an email to another professor and he was like "I would be able to answer you if I am on campus but sorry I'm not and writing math via email is too much so I can't answer you"... Are these reactions generic or are they exceptional?
Let me try to answer some of the questions in the body of your post:


  In general, how do professors react to this? If you are a professor (who is not someone who doesn't care about students) please comment below. Are they annoyed, or are they ok with it/delighted? What if they are busy?


Of course the answers are "it depends". What does it depend on? Here are a few factors:


The tone of your email: of course, people tend to respond better to polite requests than something that seems demanding or pushy. You say the professor "might well be busy". I can guarantee you that he is busy. He may or may not make the time to answer your question nevertheless, but you should make clear that you understand he is not under any obligation to do so.
The difficulty of the question: you say your question is "rather difficult", but what is rather difficult for you may not be for a professor who is expert in the subject. If your question really is something complicated that will take a long time to type an answer to, people will be less inclined to spend that time just to satisfy your curiosity.
The clarity of the question: if you choose to write and ask, you should be absolutely sure that your question makes sense and is clearly and unambiguously stated. Nothing is more vexing than putting in time to answer someone's question only to have them change what they are asking.
Personality: some people just enjoy answering questions more than others; some people guard their time more closely than others. 


Speaking just for myself, if I received such a question over the summer that was clearly written, not overly complicated, and phrased in a polite way, I would be pleased (maybe not "delighted"), and if I had time, I would try to answer.