Also, if you bought the vendor out of all their stock the price rose. If you did not buy them out the price stayed the same. I am not sure if it is still like that because I hardly ever buy from NPC's these days.
As long as I've played (start of AoS), I've NEVER seen NPCs behave that way, Kylie - though I wasn't buying much in bulk until a year or so later.
Every 1000, it ticks up (or down, for sales). Occasionally, you can buy 500, then buy less than 500, then buy 500 more at the lower price, but just means you're 400+ toward the next price raise. Eventually, you'll hit a point were you get two price raises a lot closer than you thought they'd be. Each NPC keeps track of every buy and sell, until it despawns (the shifts between two separate NPCs, that replace each other every few hours, doesn't count) usually from events (ex. when the ophidian berzerkers would kill town NPCs), a publish that substantially alters the subserver, or some types of server crashes.
This is actually easier to test selling stuff, than buying.
Oh, and the current markdown for selling stuff to NPCs, is 25%. In other words, if iron ingots are at 24 GP each, the NPC is supposed to pay 18. It was too easy to game for profit initially (Doom vendor with ammo and bandages, for example), then the first attempt to fix (making the NPCs never pay more than half of the default price) bombed worse. That resulted in the current system.