[math-fun] Maximal density of finite patters in Z/nZ