Since the other answer is based on the experience of someone traveling on an L-1 visa, it is entirely irrelevant to a traveler with a B visa. Accordingly, I am posting this in the hope that it will receive more upvotes and be the first thing that most users will see below the question.
Can one be denied entry to the US due to returning only 1 month after a 5-month stay?
Not literally for that reason, no. However, you're right about this:
I heard that if they see you return too quickly they think you're living here and might deny entry.
This is certainly a possibility. Strictly speaking, the immediate reason for the denial in this case will be that the immigration officer has found that the traveler is living in the US, not that the traveler has returned too soon after the previous visit. (More strictly still, the burden of proof is on the traveler, so one should say "the traveler hasn't proved that she isn't living in the US.")
The finding that the traveler is living in the US is a judgement call, and the traveler's travel history is just one piece of evidence that the officer uses to arrive at a determination. Other evidence about the traveler's intentions, such as family and work obligations back home, will also play a role.
In the pattern presented in this question, it's probably rather likely that the traveler would be admitted, provided that the immigration officer believes the traveler's assertion about the second visit being 15 days in duration, because in that case the total duration of presence in the United States would still be less than the six months initially granted. But it's also likely that the officer will view the claimed duration of the trip with some skepticism, so the traveler should be prepared to face some more probing questions about the reason for her itinerary: why did she leave for a month rather than stay for six months? Why is she coming for just 15 days? Why is she going back after 15 days?
If all of those questions have clear answers, then there's probably a good chance she'll be admitted. If not, or if the officer has any reason to doubt her credibility, there's probably a good chance she'll be sent back home.
If you see this, now nearly eight years after you've posted the question, it will be helpful to others if you can post your own answer describing what happened. The question was brought to the top of the list by a new user who wanted to know.