English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

What is the gretaest integer that can not be reached by adding different perfect square integers? I started thinking about this problem a few days ago but could made no progress. What is the general idea here? Does it require a graduate level of mathematics?

2007-08-23 09:05:21 · 3 answers · asked by bilgilikisi 1 in Science & Mathematics Mathematics

But here i am asking the greatest integer that can not be reached by adding ANY NUMBER OF square integers, not adding two perfect squares. Otherwise, it is clear that there is no such integer.

2007-08-23 09:34:09 · update #1

3 answers

The answer is 128

The list of all such numbers is
1 2 3 4 6 7 8 9 11 12 15 16 18 19 22 23 24 27 28 31 32 33 36 43 44 47 48 60 64 67 72 76 92 96 108 112 128.

Below you will find the program which finds all the numbers which cannot be represented by the first 24 squares. It indicates that all numbers from 129 to 4771 can be represented. Putting 25^2 in use you can represent numbers from 625+129 to 625+4771, and contuine by induction.


int main(int argc, char** argv)
{
long table[100000];
unsigned long i, j, j2;
unsigned char k,n;
for(i = 0; i<100000; i++)
{
table[i]=0;
}
for(i = 0; i<0x00FFFFFF; i++)
{
j=0;
j2=1;
n=0;
// printf("%d\n",i);
for(k=0; k<24; k++)
{
if(i&j2)
{
n++;
j+=(k+1)*(k+1);
}
j2<<=1;
if (n>1)
table[j] |=1;
}
}
for(i = 0; i<100000; i++)
{
if(!table[i])
printf("%d\n",i);
}
return (EXIT_SUCCESS);
}

2007-08-23 10:19:17 · answer #1 · answered by Alexander 6 · 0 0

Every prime number congruent to 1(mod 4)
can be written as the sum of 2 squares.
So there is no such integer.
We have Lagrange's 4 squares theorem:
Every positive integer can be represented as
the sum of 4 squares.
For more info, consultmathworld.wolfram.com/LagrangesFour-SquareTheorem.html

2007-08-23 17:36:47 · answer #2 · answered by steiner1745 7 · 0 0

there is no upper limit to the set of integers that are the sum of two squares.

proof:
suppose x is the largest such integer.
x < x^2 < x^2 + (x+1)^2 which is another such integer, but larger.

2007-08-23 16:15:00 · answer #3 · answered by holdm 7 · 0 0

fedest.com, questions and answers