Designing programmable divide-by-N counters using "off-the-shelf" logic should be easy, right?
Well, I found that data sheets don't give a lot of information, and application notes are pretty much non-existent.
So I did my own universal design using 74AC161 synchronous counters (74HC, 74LS etc. will also work).
The design is a 20-bit fully programmable divider, 100% synchronous, that can be shortened or extended to other lengths (12-bit, 16-bit, 32-bit...).
It will run at up to 37 MHz guaranteed due to the use of "carry look ahead".
You can use the schematic freely as you like, no license or anything.
I attach it in .PDF and zipped .sch (KiCAD Eeschema) formats. It's a pure logic schematic, power, decoupling etc. is left to you. Design notes are in the schematic.
Do not try building the circuit on a "solderless breadboard"; use at least a matrix board, if not a real prototype PCB. The edge rates of 74AC could otherwise cause trouble.
Cheers
EDIT: Very embarassing: A couple of the files were incorrect and the carry-look-ahead file was wrong (and actually showed the simpler ripple-carry counter). They are all correct now. I've added a .pdf schematic of the simpler divider without carry look ahead. I apologize if I've wasted time for you. Sorry