this is not specifically about Processing but it's a mathematical problem i've encountered while programming:
I'm trying to make textures with a grid of 16 (4x4) black and white pixels. Them I'm trying to parse the results. I've already found out how many permutations with a fixed number of black pixels, say 4, can I get, which is 1820. That was easy, it's a binomial coefficient: (16, 4) = 1820
Now I'd like now know which number of those LOOK really different.
For example, for only 1 black pixel there are 16 different permutations but all of them will look the same when the pattern is repeated.
For 2 pixels, there are 120 permutations, of which only 9 look different when repeated.
For 3 pixels, there are 560 permutations and I guess only 39 looking different.
The question is:
How could I calculate how many distinctively looking permutations are there for every number of pixels out of the grid of 16? In other words, how to continue the sequence 1, 9, 39...?
I hope I explained it well and that there's someone out there who knows a lot of maths. I don't. Thank you