Don't worry about that -- it happens very rarely, but I suspect that even from those few cases the vast majority are dealing with graduate students where there's a real question as to who had which ideas.
Ultimately you're just asking them for help in refining it into publishable form, so you should be first author, they should be second author.
Also, note that the first professor you go to is likely to think that what you've done isn't sufficient for a publication. That's OK. But if you try three professors and they all think that, you might want to give up trying. Based on your description (small change, decent improvement), what you've done may or may not warrant a publication all on its own.
Only if you've feeling very generous. I would acknowledge help received in a section at the end of the paper, but I would never list a co-author who didn't contribute any of the ideas.
But I've never published in a maths journal (only physics) so you probably know better than I do on this point.