The generating function enumerating n by, 4, 0-1 matrices avoiding both verti\ cal and horizontal patterns 010, 101 (i.e. the Mot Alone restrticion) is 20 19 18 17 16 15 14 13 - (9 t + 9 t - 116 t + 31 t + 304 t - 315 t - 249 t + 1570 t 12 11 10 9 8 7 6 - 980 t - 2884 t + 2696 t + 1660 t - 408 t - 1860 t - 423 t 5 4 3 2 / 20 19 18 + 547 t + 256 t + 43 t - 58 t - 7 t - 1) / (t + t - 14 t / 17 16 15 14 13 12 11 10 + 3 t + 42 t - 35 t - 43 t + 194 t - 104 t - 420 t + 348 t 9 8 7 6 5 4 3 2 + 336 t - 120 t - 312 t - 83 t + 115 t + 58 t - t - 12 t - 3 t + 1 ) and in Maple notatin -(9*t^20+9*t^19-116*t^18+31*t^17+304*t^16-315*t^15-249*t^14+1570*t^13-980*t^12-\ 2884*t^11+2696*t^10+1660*t^9-408*t^8-1860*t^7-423*t^6+547*t^5+256*t^4+43*t^3-58 *t^2-7*t-1)/(t^20+t^19-14*t^18+3*t^17+42*t^16-35*t^15-43*t^14+194*t^13-104*t^12 -420*t^11+348*t^10+336*t^9-120*t^8-312*t^7-83*t^6+115*t^5+58*t^4-t^3-12*t^2-3*t +1) For the sake of the OEIS here are the first, 50, terms [10, 100, 378, 2030, 9484, 46746, 225654, 1098136, 5327258, 25875154, 125619088 , 609970274, 2961628194, 14380186660, 69822244298, 339019686614, 1646096608476, 7992561729954, 38807580840854, 188428757462264, 914908750899146, 4442305123352810, 21569445781449640, 104729634598331642, 508510810379079306, 2469055156642623012, 11988404654002419282, 58209248897770412110, 282632823546329375444, 1372313068094537875962, 6663214601996913714558, 32352988443054943024312, 157088721243090478852394, 762738390774251269418050, 3703447632377009671982288, 17981950996116362984037922, 87310688235434464376906970, 423933770133823040453287780, 2058394511508829590555026154, 9994457303253258364502982934, 48527712364201905261712551556, 235624486237603651942047615650, 1144065850416844470124426730254, 5554968802224301469574565454424, 26971942552469497515105920991602, 130961254861128559821657940899082, 635877458267505134661854781442664, 3087479135424484198161476782402586, 14991139075213629851515220834744986, 72788913192606634996281621483985172] --------------------------- This took, 1807.347, seconds