Just turn all your excess dwarves into farmers.
That has no negative side effects whatsoever.
</jk>
Fixed.
So, a question. I can keep a small group of dwarves alive pretty much forever, 3, 4, 5 years...
Almost literally infinite in duration.
What in the heck do you people do with these annoying hordes?
One dwarf can run a fortress. From there, it all depends on what you think is "fun" (in the usual, non-DF sense of the word.) So your starting 7 can certainly cover everything needed to keep them alive "indefinitely".
Beyond that, it all depends on what you want to do with this machine you've built. Some like to build armies to crush goblins - that can be as many squads of maybe 6 dwarves as you want. I like to have archer towers manned at all times beyond my immediate fort - that takes dozens of archers, working in shifts. And a military needs a solid food and metal-bashing base - there's another dozen or so. Plus the haulers needed to keep soldiers stockpiled near their stations.
Others like to go for building, so masons are the call. Some megaprojects could easily use 20 masons full time, and still have designations lying untouched. And something that scale needs miners and/or glassmakers and/or metalsmiths (and/or soap makers, ahem) for the raw materials.
And if you're doing a vast megaproject on a dangerous map, that's even more military, for body-guard duty for those masons.
And if you're going to do a fortress "right", all of the sub-industries should be covered - the weaving/dying/clothing industry (which means more growing, of non-food plants), and breeding/leather/bonecrafting. Trapping unusual animals and vermin for a zoo and pets. Glassmaking if you've got the sand.
Look down the list of skills - surf the wiki without any particular goal in mind. There are scores of projects and elements to incorporate into a fortress. Pick one. Hell, pick three, they're small.
(edit to fix broken quote)