How do I create procedurally repetitive adsense ads?

I want to have ads besides my custom blog feed (sidebar), and I want them to load as new blogs load when you scroll down. So that the website never runs out of ads as you keep scrolling.