Explicit Polynomial Expressions for the Enumeration of 3 by 4 and 3 by 5 Semi-Magic Rectangles By Shalosh B. Ekhad and StudentsOfDrZ ExpMathClass Posted: Feb. 26, 2019 In this article we will give polynomial expressions in n, for the number of semi-magic a by b rectangles for 2xb for b<=9, and for 3x3, 3x4,3x5, and 4x4. The square cases 3x3 and 4x4 of course are famous and have been in the OEIS for a long time (Theorems of Stanley and Gupta) The 3x3 case is http://oeis.org/A002817 . The 4x4 case is http://oeis.org/A001496 . The 3x4 case is has been recently posted by Yukun Yao, http://oeis.org/A306381, and was discovered in Doron Zeilberger Experimental Mathematics class http://sites.math.rutgers.edu/~zeilberg/math640_19.html On Feb. 11, 2019, class http://sites.math.rutgers.edu/~zeilberg/EM19/C6.txt . The only new case in this article is the case of 3 by 5 magic rectangles, that is not yet (Feb. 26, 2019) but should be. ---------------------------------------------- Theorem number, 1, : The number of, 2, by , 2, rectangles with row-sums, n, and column-sums, n, equals the the following polynomial in, n, of degree , 1 n + 1 and in Maple format n+1 For the sake of the OEIS, the first, 20, terms, starting at, n, = 1 are [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21] Just for fun, the number of, 2, by , 2, semi-magic rectangles with row-sums, 1000, and column-sums, 1000, equals 1001 ---------------------------------------------- Theorem number, 2, : The number of, 2, by , 3, rectangles with row-sums, 3 n, and column-sums, 2 n, equals the the following polynomial in, n, of degree , 2 2 3 n + 3 n + 1 and in Maple format 3*n^2+3*n+1 For the sake of the OEIS, the first, 20, terms, starting at, n, = 1 are [7, 19, 37, 61, 91, 127, 169, 217, 271, 331, 397, 469, 547, 631, 721, 817, 919, 1027, 1141, 1261] Just for fun, the number of, 2, by , 3, semi-magic rectangles with row-sums, 2000, and column-sums, 3000, equals 3003001 ---------------------------------------------- Theorem number, 3, : The number of, 2, by , 4, rectangles with row-sums, 2 n, and column-sums, n, equals the the following polynomial in, n, of degree , 3 2 (n + 1) (2 n + 4 n + 3) ------------------------ 3 and in Maple format 1/3*(n+1)*(2*n^2+4*n+3) For the sake of the OEIS, the first, 20, terms, starting at, n, = 1 are [6, 19, 44, 85, 146, 231, 344, 489, 670, 891, 1156, 1469, 1834, 2255, 2736, 3281, 3894, 4579, 5340, 6181] Just for fun, the number of, 2, by , 4, semi-magic rectangles with row-sums, 1000, and column-sums, 2000, equals 668669001 ---------------------------------------------- Theorem number, 4, : The number of, 2, by , 5, rectangles with row-sums, 5 n, and column-sums, 2 n, equals the the following polynomial in, n, of degree , 4 115 4 3 185 2 --- n + 115/6 n + --- n + 35/6 n + 1 12 12 and in Maple format 115/12*n^4+115/6*n^3+185/12*n^2+35/6*n+1 For the sake of the OEIS, the first, 20, terms, starting at, n, = 1 are [51, 381, 1451, 3951, 8801, 17151, 30381, 50101, 78151, 116601, 167751, 234131, 318501, 423851, 553401, 710601, 899131, 1122901, 1386051, 1692951] Just for fun, the number of, 2, by , 5, semi-magic rectangles with row-sums, 2000, and column-sums, 5000, equals 9602515422501 ---------------------------------------------- Theorem number, 5, : The number of, 2, by , 6, rectangles with row-sums, 3 n, and column-sums, n, equals the the following polynomial in, n, of degree , 5 4 3 2 (n + 1) (11 n + 44 n + 71 n + 54 n + 20) ------------------------------------------- 20 and in Maple format 1/20*(n+1)*(11*n^4+44*n^3+71*n^2+54*n+20) For the sake of the OEIS, the first, 20, terms, starting at, n, = 1 are [20, 141, 580, 1751, 4332, 9331, 18152, 32661, 55252, 88913, 137292, 204763, 296492, 418503, 577744, 782153, 1040724, 1363573, 1762004, 2248575] Just for fun, the number of, 2, by , 6, semi-magic rectangles with row-sums, 1000, and column-sums, 3000, equals 552755756253701 ---------------------------------------------- Theorem number, 6, : The number of, 2, by , 7, rectangles with row-sums, 7 n, and column-sums, 2 n, equals the the following polynomial in, n, of degree , 6 5887 6 5887 5 2275 4 3 6643 2 259 ---- n + ---- n + ---- n + 357/4 n + ---- n + --- n + 1 180 60 18 180 30 and in Maple format 5887/180*n^6+5887/60*n^5+2275/18*n^4+357/4*n^3+6643/180*n^2+259/30*n+1 For the sake of the OEIS, the first, 20, terms, starting at, n, = 1 are [393, 8135, 60691, 273127, 908755, 2473325, 5832765, 12354469, 24072133, 43874139, 75715487, 124853275, 198105727, 304134769, 453752153, 660249129, 939749665, 1311587215, 1798705035, 2428080047] Just for fun, the number of, 2, by , 7, semi-magic rectangles with row-sums, 2000, and column-sums, 7000, equals 32803798700398025301 ---------------------------------------------- Theorem number, 7, : The number of, 2, by , 8, rectangles with row-sums, 4 n, and column-sums, n, equals the the following polynomial in, n, of degree , 7 6 5 4 3 2 (n + 1) (151 n + 906 n + 2335 n + 3300 n + 2734 n + 1284 n + 315) ---------------------------------------------------------------------- 315 and in Maple format 1/315*(n+1)*(151*n^6+906*n^5+2335*n^4+3300*n^3+2734*n^2+1284*n+315) For the sake of the OEIS, the first, 20, terms, starting at, n, = 1 are [70, 1107, 8092, 38165, 135954, 398567, 1012664, 2306025, 4816030, 9377467, 17232084, 30162301, 50651498, 82073295, 128912240, 197018321, 293897718, 429042211, 614299660, 864287973] Just for fun, the number of, 2, by , 8, semi-magic rectangles with row-sums, 1000, and column-sums, 4000, equals 482730941717581014601 ---------------------------------------------- Theorem number, 8, : The number of, 2, by , 9, rectangles with row-sums, 9 n, and column-sums, 2 n, equals the the following polynomial in, n, of degree , 8 259723 8 259723 7 132029 6 34091 5 179341 4 19321 3 37761 2 ------ n + ------ n + ------ n + ----- n + ------ n + ----- n + ----- n 2240 560 160 40 320 80 560 1599 + ---- n + 1 140 and in Maple format 259723/2240*n^8+259723/560*n^7+132029/160*n^6+34091/40*n^5+179341/320*n^4+19321 /80*n^3+37761/560*n^2+1599/140*n+1 For the sake of the OEIS, the first, 20, terms, starting at, n, = 1 are [3139, 180325, 2636263, 19610233, 97464799, 370487485, 1163205475, 3164588407, 7702189345, 17148949027, 35500063501, 69161990275, 128000343121, 226698100687, 386480229085, 637265493637, 1020310909975, 1591418959705, 2424782370859, 3617545938373] Just for fun, the number of, 2, by , 9, semi-magic rectangles with row-sums, 2000, and column-sums, 9000, equals 116412384962657110776370351 ---------------------------------------------- Theorem number, 9, : The number of, 3, by , 3, rectangles with row-sums, n, and column-sums, n, equals the the following polynomial in, n, of degree , 4 2 (n + 2) (n + 1) (n + 3 n + 4) ------------------------------ 8 and in Maple format 1/8*(n+2)*(n+1)*(n^2+3*n+4) For the sake of the OEIS, the first, 20, terms, starting at, n, = 1 are [6, 21, 55, 120, 231, 406, 666, 1035, 1540, 2211, 3081, 4186, 5565, 7260, 9316, 11781, 14706, 18145, 22155, 26796] Just for fun, the number of, 3, by , 3, semi-magic rectangles with row-sums, 1000, and column-sums, 1000, equals 125751877251 ---------------------------------------------- Theorem number, 10, : The number of, 3, by , 4, rectangles with row-sums, 4 n, and column-sums, 3 n, equals the the following polynomial in, n, of degree , 6 6 5 4 3 2 139/4 n + 417/4 n + 535/4 n + 375/4 n + 77/2 n + 9 n + 1 and in Maple format 139/4*n^6+417/4*n^5+535/4*n^4+375/4*n^3+77/2*n^2+9*n+1 For the sake of the OEIS, the first, 20, terms, starting at, n, = 1 are [415, 8623, 64405, 289981, 965071, 2626975, 6195673, 13123945, 25572511, 46610191, 80439085, 132644773, 210471535, 323122591, 482085361, 701481745, 998443423, 1393512175, 1911065221, 2579765581] Just for fun, the number of, 3, by , 4, semi-magic rectangles with row-sums, 3000, and column-sums, 4000, equals 34854383843788509001 ---------------------------------------------- Theorem number, 11, : The number of, 3, by , 5, rectangles with row-sums, 5 n, and column-sums, 3 n, equals the the following polynomial in, n, of degree , 8 48839 8 48839 7 172871 6 44185 5 229351 4 24371 3 6737 2 ----- n + ----- n + ------ n + ----- n + ------ n + ----- n + ---- n 384 96 192 48 384 96 96 + 95/8 n + 1 and in Maple format 48839/384*n^8+48839/96*n^7+172871/192*n^6+44185/48*n^5+229351/384*n^4+24371/96* n^3+6737/96*n^2+95/8*n+1 For the sake of the OEIS, the first, 20, terms, starting at, n, = 1 are [3391, 196651, 2883031, 21471226, 106778626, 406033426, 1275087976, 3469483846, 8445137176, 18804540976, 38929509136, 75846615001, 140376605461, 248624199601, 423869809051, 698929845271, 1119057407101, 1745460270001, 2659518226501, 3967786955476] Just for fun, the number of, 3, by , 5, semi-magic rectangles with row-sums, 3000, and column-sums, 5000, equals 127694536707576688830605626 ---------------------------------------------- Theorem number, 12, : The number of, 4, by , 4, rectangles with row-sums, n, and column-sums, n, equals the the following polynomial in, n, of degree , 9 (n + 3) (n + 2) (n + 1) 6 5 4 3 2 (11 n + 132 n + 683 n + 1944 n + 3320 n + 3360 n + 1890)/11340 and in Maple format 1/11340*(n+3)*(n+2)*(n+1)*(11*n^6+132*n^5+683*n^4+1944*n^3+3320*n^2+3360*n+1890 ) For the sake of the OEIS, the first, 20, terms, starting at, n, = 1 are [24, 282, 2008, 10147, 40176, 132724, 381424, 981541, 2309384, 5045326, 10356424, 20158151, 37478624, 66952936, 115479776, 193077449, 313981688, 498033282, 772409528, 1173759851] Just for fun, the number of, 4, by , 4, semi-magic rectangles with row-sums, 1000, and column-sums, 1000, equals 987619363610038121892501