Script started on Fri Apr 28 14:48:06 2000 # # Usage of program "rsq": # rsq number-of-squares number-to-represent # # Example 1. # There is one representation of zero as a vacuous sum. # csh [1] rsq 0 0 [] # # Example 2. # There is one representation of zero as a sum of ten squares. # csh [2] rsq 10 0 [0,0,0,0,0,0,0,0,0,0] # # Example 3. # There are no representations of ten as a vacuous sum. # csh [3] rsq 0 10 # # Example 4. # There are no representations of six as a sum of fewer than 3 squares. # There are 24 representations of six as three squares. The number of # representations goes up rapidly as we increase the number of squares. csh [4] rsq 0 6 csh [5] rsq 1 6 csh [6] rsq 2 6 # # [-2,-1,-1] means (-2)^2 + (-1)^2 + (-1)^2 = 6 csh [7] rsq 3 6 [-2,-1,-1] [-2,-1,1] [-2,1,-1] [-2,1,1] [-1,-2,-1] [-1,-2,1] [-1,-1,-2] [-1,-1,2] [-1,1,-2] [-1,1,2] [-1,2,-1] [-1,2,1] [1,-2,-1] [1,-2,1] [1,-1,-2] [1,-1,2] [1,1,-2] [1,1,2] [1,2,-1] [1,2,1] [2,-1,-1] [2,-1,1] [2,1,-1] [2,1,1] csh [8] rsq 3 6 | lines 24 csh [9] rsq 4 6 | lines 96 csh [10] rsq 5 6 | lines 240 csh [11] rsq 6 6 | lines 544 csh [12] rsq 7 6 | lines 1288 csh [13] rsq 8 6 | lines 3136 csh [14] rsq 9 6 | lines 7392 csh [15] rsq 10 6 | lines 16320 csh [16] rsq 11 6 | lines 33528 csh [17] ^D exit script done on Fri Apr 28 14:51:07 2000