Script started on Fri Apr 28 15:35:08 2000 csh [1] math Mathematica 4.0 for Solaris Copyright 1988-1999 Wolfram Research, Inc. -- Terminal graphics initialized -- In[1]:= << nsq.m # # One Square Theorem for n=0 to n=36 # ---------------------------------- # 2q^36 means 36 can be written as a square in two ways. # # The first term 1 can be interpreted as 1q^0, i.e. 0 has exactly # one representation as a square. # In[2]:= sq[6,q] 4 9 16 25 36 Out[2]= 1 + 2 q + 2 q + 2 q + 2 q + 2 q + 2 q # # Two Squares # In[3]:= sq[6,q,2] 2 4 5 8 9 10 13 16 Out[3]= 1 + 4 q + 4 q + 4 q + 8 q + 4 q + 4 q + 8 q + 8 q + 4 q + 17 18 20 25 26 29 32 34 36 > 8 q + 4 q + 8 q + 12 q + 8 q + 8 q + 4 q + 8 q + 4 q # # Three Squares # In[4]:= sq[6,q,3] 2 3 4 5 6 8 9 Out[4]= 1 + 6 q + 12 q + 8 q + 6 q + 24 q + 24 q + 12 q + 30 q + 10 11 12 13 14 16 17 18 > 24 q + 24 q + 8 q + 24 q + 48 q + 6 q + 48 q + 36 q + 19 20 21 22 24 25 26 27 > 24 q + 24 q + 48 q + 24 q + 24 q + 30 q + 72 q + 32 q + 29 30 32 33 34 35 36 > 72 q + 48 q + 12 q + 48 q + 48 q + 48 q + 30 q # # Four Squares # In[6]:= sq[6,q,4] 2 3 4 5 6 7 8 Out[6]= 1 + 8 q + 24 q + 32 q + 24 q + 48 q + 96 q + 64 q + 24 q + 9 10 11 12 13 14 15 > 104 q + 144 q + 96 q + 96 q + 112 q + 192 q + 192 q + 16 17 18 19 20 21 22 > 24 q + 144 q + 312 q + 160 q + 144 q + 256 q + 288 q + 23 24 25 26 27 28 29 > 192 q + 96 q + 248 q + 336 q + 320 q + 192 q + 240 q + 30 31 32 33 34 35 36 > 576 q + 256 q + 24 q + 384 q + 432 q + 384 q + 312 q # # Five Squares # In[7]:= sq[6,q,5] 2 3 4 5 6 7 Out[7]= 1 + 10 q + 40 q + 80 q + 90 q + 112 q + 240 q + 320 q + 8 9 10 11 12 13 14 > 200 q + 250 q + 560 q + 560 q + 400 q + 560 q + 800 q + 15 16 17 18 19 20 21 > 960 q + 730 q + 480 q + 1240 q + 1520 q + 752 q + 1120 q + 22 23 24 25 26 27 > 1840 q + 1600 q + 1200 q + 1210 q + 2000 q + 2240 q + 28 29 30 31 32 33 > 1600 q + 1680 q + 2720 q + 3200 q + 1480 q + 1440 q + 34 35 36 > 3680 q + 3040 q + 2250 q # # Six Squares # In[8]:= sq[6,q,6] 2 3 4 5 6 7 Out[8]= 1 + 12 q + 60 q + 160 q + 252 q + 312 q + 544 q + 960 q + 8 9 10 11 12 13 > 1020 q + 876 q + 1560 q + 2400 q + 2080 q + 2040 q + 14 15 16 17 18 19 > 3264 q + 4160 q + 4092 q + 3480 q + 4380 q + 7200 q + 20 21 22 23 24 25 > 6552 q + 4608 q + 8160 q + 10560 q + 8224 q + 7812 q + 26 27 28 29 30 31 > 10200 q + 13120 q + 12480 q + 10104 q + 14144 q + 19200 q + 32 33 34 35 36 > 16380 q + 11520 q + 17400 q + 24960 q + 18396 q # # Seven Squares # In[9]:= sq[6,q,7] 2 3 4 5 6 7 Out[9]= 1 + 14 q + 84 q + 280 q + 574 q + 840 q + 1288 q + 2368 q + 8 9 10 11 12 13 > 3444 q + 3542 q + 4424 q + 7560 q + 9240 q + 8456 q + 14 15 16 17 18 19 > 11088 q + 16576 q + 18494 q + 17808 q + 19740 q + 27720 q + 20 21 22 23 24 25 > 34440 q + 29456 q + 31304 q + 49728 q + 52808 q + 43414 q + 26 27 28 29 30 31 > 52248 q + 68320 q + 74048 q + 68376 q + 71120 q + 99456 q + 32 33 34 35 36 > 110964 q + 89936 q + 94864 q + 136080 q + 145222 q # # Eight Squares # In[10]:= sq[6,q,8] 2 3 4 5 6 7 Out[10]= 1 + 16 q + 112 q + 448 q + 1136 q + 2016 q + 3136 q + 5504 q + 8 9 10 11 12 13 > 9328 q + 12112 q + 14112 q + 21312 q + 31808 q + 35168 q + 14 15 16 17 18 19 > 38528 q + 56448 q + 74864 q + 78624 q + 84784 q + 109760 q + 20 21 22 23 24 > 143136 q + 154112 q + 149184 q + 194688 q + 261184 q + 25 26 27 28 29 > 252016 q + 246176 q + 327040 q + 390784 q + 390240 q + 30 31 32 33 34 > 395136 q + 476672 q + 599152 q + 596736 q + 550368 q + 35 36 > 693504 q + 859952 q # # Nine Squares # In[11]:= sq[6,q,9] 2 3 4 5 6 Out[11]= 1 + 18 q + 144 q + 672 q + 2034 q + 4320 q + 7392 q + 7 8 9 10 11 12 > 12672 q + 22608 q + 34802 q + 44640 q + 60768 q + 93984 q + 13 14 15 16 17 > 125280 q + 141120 q + 182400 q + 262386 q + 317376 q + 18 19 20 21 22 > 343536 q + 421344 q + 557280 q + 665280 q + 703584 q + 23 24 25 26 27 > 800640 q + 1068384 q + 1256562 q + 1234080 q + 1421184 q + 28 29 30 31 32 > 1851264 q + 2034720 q + 2057280 q + 2338560 q + 2884176 q + 33 34 35 36 > 3273792 q + 3231936 q + 3487680 q + 4428242 q # # Ten Squares # In[12]:= sq[6,q,10] 2 3 4 5 6 Out[12]= 1 + 20 q + 180 q + 960 q + 3380 q + 8424 q + 16320 q + 7 8 9 10 11 12 > 28800 q + 52020 q + 88660 q + 129064 q + 175680 q + 262080 q + 13 14 15 16 17 > 386920 q + 489600 q + 600960 q + 840500 q + 1137960 q + 18 19 20 21 22 > 1330420 q + 1563840 q + 2050344 q + 2611200 q + 2986560 q + 23 24 25 26 27 > 3358080 q + 4194240 q + 5318268 q + 5878440 q + 6299520 q + 28 29 30 31 32 > 7862400 q + 9619560 q + 10216320 q + 11082240 q + 13415220 q + 33 34 35 36 > 15928320 q + 17163880 q + 18028800 q + 21250420 q # # Eleven Squares # -------------- # For example, 36 can be written as a sum of eleven squares in _exactly_ # 101,189,550 ways. By comparison, the population of the United States is # approximately 275,000,000 people. In[13]:= sq[6,q,11] 2 3 4 5 6 Out[13]= 1 + 22 q + 220 q + 1320 q + 5302 q + 15224 q + 33528 q + 7 8 9 10 11 > 63360 q + 116380 q + 209550 q + 339064 q + 491768 q + 12 13 14 15 16 > 719400 q + 1095160 q + 1538416 q + 1964160 q + 2624182 q + 17 18 19 20 21 > 3696880 q + 4763220 q + 5686648 q + 7217144 q + 9528816 q + 22 23 24 25 > 11676280 q + 13495680 q + 16317048 q + 20787470 q + 26 27 28 29 > 25022184 q + 27785120 q + 32503680 q + 40862184 q + 30 31 32 33 > 47430768 q + 51321600 q + 59759260 q + 72766320 q + 34 35 36 > 82927856 q + 89663728 q + 101189550 q In[14]:= ^D csh [2] ^Dexit script done on Fri Apr 28 15:38:12 2000