Re: Representing integers as sums of 3 squares
- To: mathgroup at smc.vnet.net
- Subject: [mg37729] Re: [mg37728] Representing integers as sums of 3 squares
- From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
- Date: Sun, 10 Nov 2002 05:38:28 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
> Hi, > > I am looking for Mathematica code computing representation of _large_ > suitable > integers as sums of three squares. I would like to try the approach > of Emil > Grosswald in chapter 4 of his book `Representation of integers as sums > of > squares', ß1 to 7. > > > > How large? If not too large the following will do: In[1]:= <<NumberTheory`NumberTheoryFunctions` In[2]:= SumOfSquaresRepresentations[3,10^6+1]//Timing Out[2]= {19.35 Second,{{0,1,1000},{0,199,980},{1,280,960},{1,352,936},{1,600,800},{ 2,194,981},{2,454,891},{7,444,896},{8,44,999},{8, 89,996},{12,401,916},{12,544,839},{14,357,934},{ 14,533,846},{20,40,999},{20,660,751},{21,286,958},{21, 346,938},{22,299,954},{22,614,789},{27,106,994},{28,476,879},{30,485,\ 874},{36,121,992},{36,692,721},{40,600,799},{42,101,994},{43,446,894},{4 4,327,\ 944},{44,559,828},{44,593,804},{46,154,987},{46,469,882},{47,76,996},{ 52,441,896},{54,181,982},{54,677,734},{56,104,993},{ 56,679,732},{57,464,884},{58,219,974},{62,251,966},{ 64,377,924},{64,513,856},{68,524,849},{71,224,972},{ 71,404,912},{72,601,796},{75,370,926},{76,324,943},{ 76,560,825},{78,226,971},{78,506,859},{82,334,939},{ 82,426,901},{84,196,977},{84,664,743},{85,210,974},{ 89,604,792},{90,299,950},{91,242,966},{91,386,918},{ 96,121,988},{96,236,967},{96,496,863},{96,632,769},{ 98,309,946},{100,624,775},{101,238,966},{101,630,770},{103, 456,884},{104,551,828},{106,618,779},{107,306, 946},{107,474,874},{111,404,908},{111,484,868},{112,444,889},{ 117,194,974},{118,154,981},{118,539,834},{120,124,985},{ 121,516,848},{121,624,772},{124,391,912},{124,495,860},{ 124,687,716},{126,230,965},{126,395,910},{126,491,862},{ 126,634,763},{127,656,744},{128,636,761},{132,551,824},{ 133,666,734},{134,198,971},{134,334,933},{134,546,827},{ 134,658,741},{138,554,821},{139,218,966},{139,642,754},{ 140,615,776},{142,474,869},{145,460,876},{146,149,978},{ 146,693,706},{149,414,898},{149,470,870},{150,574,805},{ 154,629,762},{154,683,714},{155,670,726},{160,455,876},{ 161,288,944},{161,336,928},{162,341,926},{167,344,924},{ 175,340,924},{181,546,818},{190,390,901},{194,587,786},{ 194,678,709},{196,519,832},{197,226,954},{197,586,786},{ 198,386,901},{199,588,784},{202,534,821},{202,686,699},{ 203,294,934},{204,224,953},{204,628,751},{212,281,936},{ 212,484,849},{216,359,908},{216,511,832},{217,504,836},{218,266,939},{ 219,538,814},{222,526,821},{223,384,896},{224,640,735},{ 225,520,824},{226,645,730},{229,366,902},{229,502,834},{ 230,426,875},{231,328,916},{231,536,812},{232,644,729},{236,657, 716},{240,376,895},{245,274,930},{246,299,922},{246,314, 917},{250,670,699},{251,282,926},{251,330,910},{251,530, 810},{257,576,776},{260,460,849},{260,576,775},{261,286, 922},{261,566,782},{266,389,882},{267,406,874},{268,401, 876},{272,351,896},{273,476,836},{274,362,891},{274,597, 754},{278,629,726},{281,364,888},{281,392,876},{281,492, 824},{286,558,779},{286,581,762},{288,356,889},{292,601, 744},{293,666,686},{294,398,869},{299,498,814},{299,590, 750},{299,642,706},{302,331,894},{303,356,884},{303,524, 796},{306,482,821},{308,364,879},{309,646,698},{313,624, 716},{314,586,747},{315,370,874},{315,526,790},{320,351, 880},{324,337,884},{324,505,800},{328,504,799},{331,418, 846},{331,426,842},{331,534,778},{334,629,702},{334,666,667},{336,428, 839},{341,426,838},{344,639,688},{345,376,860},{346,546, 763},{351,512,784},{357,634,686},{358,366,859},{359,372, 856},{363,574,734},{373,646,666},{376,481,792},{376,572, 729},{380,540,751},{384,583, 716},{385,624,680},{386,478,789},{386,602,699},{389,546,742},{391,448, 804},{392,456,799},{401,540,740},{404,456,793},{ 404,604,687},{406,539,738},{408,481,776},{412,516,751},{ 414,629,658},{420,601,680},{426,475,770},{426,562,709},{ 432,484,761},{438,581,686},{441,496,748},{443,526,726},{ 444,532,721},{444,623,644},{446,502,741},{448,456,769},{ 453,506,734},{454,533,714},{455,524,720},{464,576,673},{ 469,566,678},{474,610,635},{476,505,720},{484,552,679},{ 491,614,618},{511,536,672},{513,544,664},{519,548,656},{ 532,559,636},{545,560,624},{551,580,600},{554,574,603}}} This is on a 400 mghz PowerBook G4. Andrzej Kozlowski Yokohama, Japan http://www.mimuw.edu.pl/~akoz/ http://platon.c.u-tokyo.ac.jp/andrzej/ On Saturday, November 9, 2002, at 02:31 PM, nobody at this.org wrote: