vb.net euclidean math

I have a vb.net forms windows app. I have 16 buttons representing the steps of a sequencer.
I would like to mimic the attached. if the user selects 16 we see 16 if they choose 8 we only see 8. after that the euclidean math should tell me the buttons to illuminate. the embedded drawings explain better.

so the user enters the total steps and then the fills and the buttons illuminate.

I can deal with the button behaviours and combo's. I dont know how to use the maths euclid function to get the results I need i.e which buttons to illuminate based on the euclidean algorhthm.

Creating an analog clock UserControl seems fairly straight forward. It is, after all, essentially just a circle with several lines in it! Two common approaches for rendering an analog clock typically involve either manually calculating points with…

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.

Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster.
To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…