Hmm. Well, as I never was good with numbers and played game, like, half-year ago, I can be totally wrong with it. But I still believe it was class-dependant in my version... Let me check it. Maybe I am totally wrong - then I am sorry.
---update---
There are
two increasers, as I see.
100-500-1500-5000 is here.
But "ten-fold" increasers is here at well.
So after 1st hero (say, Warrior) you can buy second hero for 500... if it's
not a warrior, as second warrior have price of 5 000 gold right away. Price increases with each new hero. So when you buy second hero (say, Mage), you still can buy next for 1 500... if it's not a Warrior or Mage, as each of this costs 15 000. This law repeats now and again, and in my last game I have full 7 heroes - but 8th hero, Leader, would cost me 50k (and any hero of other classes - 500k, obviously).