@svan Grid patterns are a current focus of mine. So this is very interesting!! And @Chrisir’s suggestion reminded me of a post by @hamoid a while back that shows another possible(?) solution to this problem using modulo.
Scroll down to Example 9B: