The generating function enumerating n by, 3, 0-1 matrices avoiding both verti\ cal and horizontal patterns 010, 101 (i.e. the Mot Alone restrticion) is 4 2 5 t - 19 t - 4 t - 1 - ---------------------- 4 2 t - 5 t - 2 t + 1 and in Maple notatin -(5*t^4-19*t^2-4*t-1)/(t^4-5*t^2-2*t+1) For the sake of the OEIS here are the first, 50, terms [6, 36, 102, 378, 1260, 4374, 14946, 51384, 176238, 605022, 2076288, 7126302, 24457806, 83942100, 288096942, 988778082, 3393583068, 11647114446, 39974047290, 137194888728, 470866430838, 1616060190870, 5546478488640, 19036063042902, 65333652098166, 224231559219972, 769584900442134, 2641291533941226, 9065173917994956, 31112573946476070, 106781432582484786, 366484443363408696, 1257810875721246366, 4316931394313060142, 14816135734649867328, 50850443997501626670, 174523755792531343614, 598982800178257760436, 2055768243584522371614, 7055600044062831918738, 24215517550255744351932, 83110052520647390537118, 285241924548988980462282, 978978511657152081691416, 3359951128508993321342310, 11531684762783099660604582, 39577883243562176947458432, 135835211789382700116248358, 466199888668067291648446566, 1600044151520264984217530340] --------------------------- This took, 5.371, seconds