I'm in pure math. It seems like "postdoc mentors" are common nowadays in U.S. universities. The idea is that you do a postdoc under the supervision of someone whom you can write papers with. My impression though is that a lot of mathematicians didn't have postdoc mentors. Would it be a bad sign to not have a postdoc mentor? Would it be negative for productivity and developing a publication record and recommendation letters?
It is true that, long ago, when "post docs" were not as numerous as now, there was no idea at all that you'd have a mentor. Rather, even though you'd be a new PhD, you were "an expert". And, also, long ago, joint papers were not so common.
That culture has not disappeared, unfortunately. Yes, in my opinion, sensible people of_course think in terms of mentoring... But this viewpoint is not universal.
Joint papers are a yet-subtler thing: good to have a collaboration, but these days, still, a joint paper with a senior person (in math) may be less of a CV-boost than a solo paper. As an "old person" myself, I try to give useful advice to junior people without trying to get my name on their papers.
EDIT: to answer more of the question, ... letters of recommendation for your next job do need to come from people who have engaged with you. This doesn't have to be a "mentor", though obviously a person who takes that role should be in a good position to write a helpful letter. At least in the old days ^tm, a postdoc's goal was to make a good impression on at least a few senior people in the dept, for letters. Seminar talks were the usual way.
I think the letter-of-recommendation concern is more substantial than "productivity", in saner parts of math. :)
I think there is some confusion about what a "postdoc mentor" is actually supposed to do.
But, to start with, let me just say that I don't think anyone can be successful in an academic career without a mentor. A mentor is supposed to help a mentee go through their career by providing advice on the many things a newly graduated PhD simply cannot know: How to deal with reviewing papers, how applications are read by hiring committees, how to become a mentor to students themselves, how to deal with authorship disputes, how to write grant applications, and many other things. That is what a mentor is supposed to do, and because so many things in academia are sub-discipline-specific, it only makes sense that such a mentor comes from the same sub-discipline.
That often leads to joint papers, but that is a side effect and not the main reason to have a mentor for postdocs. The main reason is simply to ensure that the people we hire into postdoc positions don't fall through the cracks but are successful in their careers!
This depends on the individual and the department that you join, in math, anyway. If there are a few (or a lot) faculty in your specialty and they hold periodic seminars to discuss one another's work, then a mentor probably isn't needed.
But if you still feel a bit shaky in your research ability, then a mentor might help give you a boost. I don't think it would be a bad sign to not have a mentor (or to have one), but you want to make enough faculty contacts and earn the respect of your colleagues so that you get a boost for your next steps.
Of course, there are a lot more joint papers these days than there were in the past. You want the opportunity for collaboration, however you can arrange it.