What's a good cheap flash for taking repeating flash photographs using a Nikon D3100?
I' not sure exactly what this is called, so I'm not sure how to ask the question do I hope this makes sense.
I think you're looking for a stroboscopic mode, where the flash fires multiple times in one exposure.
The Nikon SB-800 and SB-900 have this feature — Nikon calls it "repeating mode". (The SB-700 does not.) That probably doesn't fit your definition of "cheap", though.
Another option is the Sigma EF610 DG Super, which you can get for $225, or the Nissin Di866 for around $300. These third-party flashes are reverse-engineered "dedicated flashes", which come in specific versions for Nikon, Canon, Pentax, etc., and have advanced features rivaling the system-branded models.
Metz has a stroboscopic mode too, but only on their $350+ model. Also, the cheaper Sigma EF610DG ST (presumably for "standard", as opposed to "super") and the lower-end Nissin models don't have the feature.
The Promaster 7500EDF is another $250 option, but I hesitate to recommend it, because a) it has a more-limited version of the feature with a max of 10 flashes in a sequence and b) for Pentax at least Promaster has done a poor job keeping up compatibility with new camera bodies, and while they might be better with Nikon I wouldn't count on it.
I don't know of any cheap flashes that offer stroboscopic mode. The high end OEM flashes have it - Canon 580 and Nikon SB-800 & SB-900. Canon calls it Multi Mode, Nikon calls it Repeating Flash.
Your other option is to get cheap flashes, use them at low power and use Pocket Wizard MultiMaxs, they offer the option to pop the flash multiple times in one exposure. This might be the best option, because then you have radio triggers and a flash instead of just a flash.
Yongnuo has (at least) two models for Nikon that have what they call "multi mode"
The YN-468 that costs about $90 and the YN-565EX for about $150 (from eBay, new, including shipping)