A few quick observations: - The right edge of the triangle is always red (ie, no primes present), because it represents (row number) * (3* (row number)+[1..6]) - Prime numbered rows are always black (except the far right column). I can sort of feel why this is true but can't express it mathematically yet.
Cell i of row j contains n elements of an arithmetic progression, with common difference of j. If i and j have a GCD != 1, they are not coprime, so they share a factor p, as do all numbers in the sequence, so they cannot be prime
Otherwise it's very likely there's at least one prime
If j is prime every column i is coprime with it, so it's going to be black