![]() |
Sum of two squares: Peculiar property
Yesterday, I had some fun with [URL="http://wims.unice.fr/wims/wims.cgi?session=N03810AEFF.3&+lang=en&+module=tool%2Fnumber%2Ftwosquares.en"]WIMS online calculator[/URL] on decomposing any positive integer N
into sum of two squares. On playing with it, I found that, as it says A positive integer cannot be a sum of two squares if it has a prime factor of the form 3 (mod 4) to an odd power. Why? I would like to see a proof for it! :rolleyes: Since any square will be of the form 0 or 1 (mod 4) only, it is directly quite obvious that sum of two squares cannot be 3 (mod 4). A square can only be 0, 1, 4 or 9 (mod 16). But even if it is the product of two distinct primes of the form 3 (mod 4), or something else multiplied with it, that make the product equal to 1 (mod 4), still is it not possible at all, to be a sum of two squares? How come? :surprised Any proof that is being available anywhere for this case only? :surrender Further, that decomposition into two squares has many more surprising properties. 1) If N is the product of n distinct primes of the form 1 (mod 4), then the number of ways that N can be written as sum of two squares is 2[sup]n-1[/sup]. Show how! :help: 2) If N has even one single prime factor of form 3 (mod 4) to an odd power, then decomposing N as sum of two squares is impossible! :shock: 3) If p is a prime of the form 1 (mod 4), then the number of ways that p[sup]n[/sup] can be written up as sum of two squares is given by Int((n/2)+1). Again why? 4) A number multiplied with a power of 2, does not change the number of ways of decomposing that number into sum of two squares at all! 5) Further, how to determine the number of ways of decomposing into sum of two squares for some complex expressions of the form p[sub]1[/sub][sup]2[/sup]*p[sub]2[/sub] or p[sub]1[/sub][sup]9[/sup]*p[sub]2[/sub][sup]7[/sup]*p[sub]3[/sub], etc. where the p[sub]i[/sub]'s are distinct prime numbers of the form 1 (mod 4) only? This is rather looking up to be somewhat tedious only... :confused: |
I'm going to take a small stab at this but I will botch it because I don't swim with the big fish.
In binary, it is helpful to notice that odd numbers squared are not only of the form 1 (mod) 4, they are are more specifically of the form 1 (mod) 8. In a binary representation that means they always ends in 001. This is because: (2n+1)[sup]2[/sup] = = 4n[sup]2[/sup] + 4n + 1 = 4(n[sup]2[/sup] + n) + 1 If n itself is also odd, n[sup]2[/sup] + n will be even (odd number + odd number equals even number) so another 2 can be factored out making the total result of the odd number squared = 8k + 1. This is the form 1 (mod) 8. (k = (n[sup]2 [/sup] + n)/2) An even number will always have a 0 bit less significant than the least significant 1 bit. These number of these least significant 0s will be doubled after squaring (as they do in any integer base i.e. 10 * 10 = 100 etc.) The binary representation of squaring the bits starting from the least significant 1 bit will be exactly like any odd number squared (except for the magnitude/position as changed by doubling the number of 0s to the right of it) [quote]4) A number multiplied with a power of 2, does not change the number of ways of decomposing that number into sum of two squares at all![/quote] The power of 2 is completely represented by the 0s to the right of the least significant one. All of it is merely a representation of magnitude (in binary) and does not affect how the more significant bits are added together. So if I have made this at all clear, adding squares can be directly thought of as selecting patterns ending in either 00 or 001 and adding a combination of them together.. [quote]Since any square will be of the form 0 or 1 (mod 4) only, it is directly quite obvious that sum of two squares cannot be 3 (mod 4). A square can only be 0, 1, 4 or 9 (mod 16). But [B]even if it is the product of two distinct primes of the form 3 (mod 4), or something else multiplied with it, that make the product equal to 1 (mod 4), still is it not possible at all, to be a sum of two squares?[/B] How come? Any proof that is being available anywhere for this case only?[/quote] The sum of two squares can only be 1 (mod 4) if it is also 1 (mod 8). That is, the sum of two squares will only be values that can be attained by adding selections ending in 00 or 001 together) [quote]2) If N has even one single prime factor of form 3 (mod 4) to an odd power, then decomposing N as sum of two squares is impossible![/quote] Since the binary representation of squares ends in 00 or 001, there is no way to select two values ending like these and add them together get a value ending in 11 (adding three values ending in 001 would work, but not two).. I'm stopping here because the rest doesn't come so easily to me and I think I have already bitten off more than I can chew |
[QUOTE=only_human;203570]The power of 2 is completely represented by the 0s to the right of the least significant one. All of it is merely a representation of magnitude (in binary) and does not affect how the more significant bits are added together[/QUOTE] Don't invest too much time trying to figure out what I meant by this; I blurred sums and products in my thinking and was waving my hands without the chops to do so.
Thank you, everyone, for the mercy of not replying directly to my message but I don't want to derail the thread so feel free to answer the puzzle. I, myself am still thinking about the puzzles numbered section and may join in again on that aspect. |
[QUOTE=only_human;203650]I, myself am still thinking about the puzzles numbered section and may join in again on that aspect.[/QUOTE]
You may find it helpful to know that the product of two numbers that are a sum of squares is again a sum of squares: (a[sup]2[/sup] + b[sup]2[/sup]) * (x[sup]2[/sup] + y[sup]2[/sup]) = (ax+by)[sup]2[/sup] + (ay-bx)[sup]2[/sup] This pretty little formula has a simple generalization for numbers of the form a[sup]2[/sup]+nb[sup]2[/sup] (n fixed; n=1 above) |
It is quite puzzling that every prime number of the form 1 (mod 4) has
UNIQUE representation as sum of two squares, while every prime number of the form 3 (mod 4) has no such representation. This is obvious though, as I had only mentioned up above already. [quote=Raman;203542][B]Even if it is the product of two distinct primes of the form 3 (mod 4), or something else multiplied with it, that make the product equal to 1 (mod 4), still is it not possible at all, to be a sum of two squares?[/B][/quote] Any number with prime factor of the form 3 (mod 4), to an odd power has no representation as sum of two squares at all. In order to prove this fact: If all prime factors are of the form 1 (mod 4), then product is 1 (mod 4) If the product is 3 (mod 4), it quite obviously has no decomposition into two squares. In order to make the product equal to 1 (mod 4), there should be even number of primes of the form 3 (mod 4), atleast one of them much be distinct from the others, such that it has no decomposition into two squares, as by the rule saying. A square can be only 0,1,4,9 (mod 16) or 0,1,4 (mod 8) Trying to prove that fact: If all primes are of form 1 (mod 16), then the product is 1 (mod 16) If there are two distinct primes of the form 3 (mod 4), then the product is 9 (mod 16), no there can be a prime of the form 9 (mod 16), or more primes of the form 3 (mod 4), and then the product can be 1 (mod 16) as well. There can be primes of the form 9 (mod 16) as well, that are of the form 1 (mod 4). With these primes, with primes of form 1 (mod 16), the product can be 1 (mod 16) or 9 (mod 16) as well. With these, with primes of form 5 (mod 16) and then 13 (mod 16), the product can be either 1 (mod 16), 5 (mod 16), 9 (mod 16), or 13 (mod 16). Each has its own way of splitting up into sum of two squares. If N is 1 (mod 16), it can be sum of two squares of form 0 (mod 16) & 1 (mod 16) If N is 9 (mod 16), it can be sum of two squares of form 0 (mod 16) & 9 (mod 16) If N is 5 (mod 16), it can be sum of two squares of form 4 (mod 16) & 1 (mod 16) If N is 13 (mod 16), it can be sum of two squares of form 4 (mod 16) & 9 (mod 16) as well. Sum of two squares can be only 0,1,2,4,5,8,9,10,13 (mod 16). But even then, it covers up all sums of the form 1 (mod 4). The fact to be proved is that: If a number of the form 1 (mod 4) has some decomposition into sum of two squares, then it has no prime factors of the form 3 (mod 4) to an odd power at all. How to approach it up? :alien2: |
Got up the proofs from one of the books within library only...
1) It is obvious that a square can be only 0 or 1 (mod 4). So, sum of two squares cannot be 3 (mod 4). 2) Next, the proof that if p divides N, and p is prime of form 3 (mod 4) then N has no sum of two squares representation in lowest terms. That is, N cannot be represented as x[sup]2[/sup]+y[sup]2[/sup], such that gcd(x,y) = 1. Proof: Since p|N, so p|x[sup]2[/sup]+y[sup]2[/sup]. If p|x, then p|y also, so gcd(x,y) is not 1. So, p cannot divide x or y. So, x and y are congruent between 1 and p-1 (mod p). Let y=ux, where 1 <= u <= p-1. Then, since N = x[sup]2[/sup]+y[sup]2[/sup] = 0 (mod p), x[sup]2[/sup](1+u[sup]2[/sup]) = 0 (mod p). p does not divide x, so (1+u[sup]2[/sup]) = 0 (mod p). So, -1 is a quadratic residue (mod p). This is false when p is a prime of form 3 (mod 4). So, N has no sum of two squares representation in lowest terms (x,y) = 1. If it exists, it should be such that y = ux (mod p) such that u[sup]2[/sup] = -1 (mod p), where p is a prime of form 3 (mod 4) only. 3) Next the proof that if N has a prime factor p of form 3 (mod 4) to an odd power, then N has no sum of two squares representation at all. Let p[sup]c[/sup] divide N, and p[sup]c+1[/sup] does not divide N, where c is odd, let N = x[sup]2[/sup]+y[sup]2[/sup] with gcd(x,y) = d. then N = d[sup]2[/sup](X[sup]2[/sup]+Y[sup]2[/sup]) with gcd(X,Y)=1. Putting X[sup]2[/sup]+Y[sup]2[/sup] = n, N = d[sup]2[/sup]n. Let p[sup]m[/sup] be the highest power of p, that divides d. Since n = N/d[sup]2[/sup], so highest power of p that divides n is c-2m. Since c is odd, c-2m > 0. So, p divides n. Since, n = X[sup]2[/sup]+Y[sup]2[/sup], with gcd(X,Y) = 1, p dividing N with p being a prime of form 1 (mod 4). This is not possible by (2). Hence the result. Even if N contains power of p to an even power, the representation of N as sum of two squares can be only multiples of those values of N divided by all those primes that are congruent to 3 (mod 4). 4) If p is a prime of form 1 (mod 4), then there exist values of x,y less than p such that x[sup]2[/sup]+y[sup]2[/sup] = mp, where 0 < m < p. Proof: If p is prime of form 1 (mod 4), then -1 is a quadratic residue (mod p). If z is quadratic residue, then so is -z. Since z[sup]2[/sup] is quadratic residue, so is -z[sup]2[/sup]. Since k[sup]2[/sup] mod p = (p-k)[sup]2[/sup] mod p, the quadratic residues are symmetric, so the distinct quadratic residues are from k[sup]2[/sup], where k is between 1 to (p-1)/2 only. Within this range, for some quadratic residue x[sup]2[/sup], there exist some other value of y such that y[sup]2[/sup] = -x[sup]2[/sup] mod p. So, x[sup]2[/sup]+y[sup]2[/sup] = 0 (mod p). Let x[sup]2[/sup] + y[sup]2[/sup] = mp. Clearly, m>0. Since, x[sup]2[/sup] + y[sup]2[/sup] <= 2*((p-1)/2)[sup]2[/sup], so m<p. 5) Next comes the proof that for any prime p of form 1 (mod 4), there exist values of x,y such that x[sup]2[/sup]+y[sup]2[/sup] = p. Proof by method of infinite descent. If m=1, then there is nothing to prove at all. If m>1, then x[sup]2[/sup]+y[sup]2[/sup] = mp, so that x[sup]2[/sup]+y[sup]2[/sup] = 0 (mod m). Let r and s be minimal residues of x and y (mod m), such that -m/2 < r,s < m/2. r is congruent to x (mod m) and y is congruent to s (mod m). So, r[sup]2[/sup]+s[sup]2[/sup] = 0 (mod m). r and s cannot be both zero simultaneously, because if so, then m divides both x and y, so m[sup]2[/sup] divides x[sup]2[/sup]+y[sup]2[/sup] = mp, so m divides p. This is false since p is prime. Let r[sup]2[/sup]+s[sup]2[/sup] = nm. Since, -m/2 < r,s < m/2, so n < m. (x[sup]2[/sup]+y[sup]2[/sup])(r[sup]2[/sup]+s[sup]2[/sup]) = m[sup]2[/sup]np (xr+ys)[sup]2[/sup] + (xs - yr)[sup]2[/sup] = m[sup]2[/sup]np Since x and r belong to the same residue class (mod m), and so does y and s, m divides (xr+ys), since x[sup]2[/sup]+y[sup]2[/sup] = 0 (mod m), m also divides (xs-yr) = (xy-yx) mod m = 0 (mod m). Let (xr+ys) = am, and that (xs-yr) = bm, then a[sup]2[/sup]m[sup]2[/sup] + b[sup]2[/sup]m[sup]2[/sup] = m[sup]2[/sup]np or that, a[sup]2[/sup] + b[sup]2[/sup] = np, where n < m. This says that there exist integers a, b such that a[sup]2[/sup]+b[sup]2[/sup] = np, where n<m. We can keep continuing this descent until we get some integers u and v such that u[sup]2[/sup]+v[sup]2[/sup] = p, where p is a prime of form 1 (mod 4). 6) Next we have to prove such representation is unique. Let N = a[sup]2[/sup]+b[sup]2[/sup] = c[sup]2[/sup]+d[sup]2[/sup], with two distinct sum of two squares representation. Then N is composite. Proof: Since even number other than 2 is composite, we will consider only the case when N is odd. 2 has only one such representation, by the way. If N is odd. One of a,b is odd, and so is c,d pair as well. Let a,c be odd. b,d be even. Let a>c, then b<d. Since we have that a[sup]2[/sup]+b[sup]2[/sup] = c[sup]2[/sup]+d[sup]2[/sup] thus, a[sup]2[/sup]-c[sup]2[/sup] = d[sup]2[/sup]-b[sup]2[/sup] (a-c)(a+c) = (d-b)(d+b) where a-c, a+c, d-b, d+b are all even. Let gcd(a-c,d-b) = g, where g is clearly even. Let a-c = ug, d-b = vg, where gcd(u,v)=1. Then, ug(a+c) = vg(d+b), u(a+c) = v(d+b). So u divides d+b, v divides a+c. Let a+c = tv. Putting that, then it becomes that d+b = tu. Since that gcd(u,v)=1 and a+c and d+b are both odd, hence that t is being even only. So, 2N = a[sup]2[/sup] + b[sup]2[/sup] + c[sup]2[/sup] + d[sup]2[/sup] 4N = 2a[sup]2[/sup] + 2c[sup]2[/sup] + 2b[sup]2[/sup] + 2d[sup]2[/sup] 4N = (a+c)[sup]2[/sup] + (a-c)[sup]2[/sup] + (d+b)[sup]2[/sup] + (d-b)[sup]2[/sup] 4N = t[sup]2[/sup]v[sup]2[/sup] + u[sup]2[/sup]g[sup]2[/sup] + t[sup]2[/sup]u[sup]2[/sup] + v[sup]2[/sup]g[sup]2[/sup] 4N = (t[sup]2[/sup]+g[sup]2[/sup])(u[sup]2[/sup]+v[sup]2[/sup]) N = ((t/2)[sup]2[/sup]+(g/2)[sup]2[/sup])(u[sup]2[/sup]+v[sup]2[/sup]) Since t and g are both odd, so we have that (t/2) and (g/2) are both integers. So, N is representable as product of two integers, both being clearly > 1 only. Thus, N is composite. EVERY PRIME OF FORM 1 (MOD 4) CAN BE UNIQUELY REPRESENTED AS SUM OF TWO SQUARES. 7) It is also given in the book that every number that is not of form 4[sup]b[/sup](8c+7) can be represented as sum of three squares. 8) Regarding number of ways of representing an arbitrary value of N as sum of two squares: Since (a[sup]2[/sup]+b[sup]2[/sup])(c[sup]2[/sup]+d[sup]2[/sup]) = (ac+bd)[sup]2[/sup] + (ad-bc)[sup]2[/sup] = (ac-bd)[sup]2[/sup] + (ad+bc)[sup]2[/sup] The product of two distinct primes of form 1 (mod 4) can be represented as sum of two squares in two ways. Pending exercise to prove that these are the only ways of such representation. Why is it so? Continuing up in this way, it is certainly possible to see that the product of k distinct primes of form 1 (mod 4) can be represented in 2[sup]k-1[/sup] ways. Only that much? Sure about that? 9) Regarding product with a power of 2 will not change the number of ways of representation at all: This is because of the fact that 2(a[sup]2[/sup]+b[sup]2[/sup]) = (a+b)[sup]2[/sup] + (a-b)[sup]2[/sup] Continuing this up only, we will get that 4(a[sup]2[/sup]+b[sup]2[/sup]) = (2a)[sup]2[/sup] + (2b)[sup]2[/sup] Are these the only ways of such representation? Sure enough already? Only this much? |
assonance
[QUOTE=Raman;204341]Got up the proofs from one of the books within library only...
1) It is obvious that a square can be only 0 or 1 (mod 4). So, sum of two squares cannot be 3 (mod 4). 2) Next, the proof that if p divides N, and p is prime of form 3 (mod 4) then N has no sum of two squares representation in lowest terms. That is, N cannot be represented as x[sup]2[/sup]+y[sup]2[/sup], such that gcd(x,y) = 1. Proof: Since p|N, so p|x[sup]2[/sup]+y[sup]2[/sup]. If p|x, then p|y also, so gcd(x,y) is not 1. So, p cannot divide x or y. So, x and y are congruent between 1 and p-1 (mod p). Let y=ux, where 1 <= u <= p-1. Then, since N = x[sup]2[/sup]+y[sup]2[/sup] = 0 (mod p), x[sup]2[/sup](1+u[sup]2[/sup]) = 0 (mod p). p does not divide x, so (1+u[sup]2[/sup]) = 0 (mod p). So, -1 is a quadratic residue (mod p). This is false when p is a prime of form 3 (mod 4). So, N has no sum of two squares representation in lowest terms (x,y) = 1. If it exists, it should be such that y = ux (mod p) such that u[sup]2[/sup] = -1 (mod p), where p is a prime of form 3 (mod 4) only. 3) Next the proof that if N has a prime factor p of form 3 (mod 4) to an odd power, then N has no sum of two squares representation at all. Let p[sup]c[/sup] divide N, and p[sup]c+1[/sup] does not divide N, where c is odd, let N = x[sup]2[/sup]+y[sup]2[/sup] with gcd(x,y) = d. then N = d[sup]2[/sup](X[sup]2[/sup]+Y[sup]2[/sup]) with gcd(X,Y)=1. Putting X[sup]2[/sup]+Y[sup]2[/sup] = n, N = d[sup]2[/sup]n. Let p[sup]m[/sup] be the highest power of p, that divides d. Since n = N/d[sup]2[/sup], so highest power of p that divides n is c-2m. Since c is odd, c-2m > 0. So, p divides n. Since, n = X[sup]2[/sup]+Y[sup]2[/sup], with gcd(X,Y) = 1, p dividing N with p being a prime of form 1 (mod 4). This is not possible by (2). Hence the result. Even if N contains power of p to an even power, the representation of N as sum of two squares can be only multiples of those values of N divided by all those primes that are congruent to 3 (mod 4). 4) If p is a prime of form 1 (mod 4), then there exist values of x,y less than p such that x[sup]2[/sup]+y[sup]2[/sup] = mp, where 0 < m < p. Proof: If p is prime of form 1 (mod 4), then -1 is a quadratic residue (mod p). If z is quadratic residue, then so is -z. Since z[sup]2[/sup] is quadratic residue, so is -z[sup]2[/sup]. Since k[sup]2[/sup] mod p = (p-k)[sup]2[/sup] mod p, the quadratic residues are symmetric, so the distinct quadratic residues are from k[sup]2[/sup], where k is between 1 to (p-1)/2 only. Within this range, for some quadratic residue x[sup]2[/sup], there exist some other value of y such that y[sup]2[/sup] = -x[sup]2[/sup] mod p. So, x[sup]2[/sup]+y[sup]2[/sup] = 0 (mod p). Let x[sup]2[/sup] + y[sup]2[/sup] = mp. Clearly, m>0. Since, x[sup]2[/sup] + y[sup]2[/sup] <= 2*((p-1)/2)[sup]2[/sup], so m<p. 5) Next comes the proof that for any prime p of form 1 (mod 4), there exist values of x,y such that x[sup]2[/sup]+y[sup]2[/sup] = p. Proof by method of infinite descent. If m=1, then there is nothing to prove at all. If m>1, then x[sup]2[/sup]+y[sup]2[/sup] = mp, so that x[sup]2[/sup]+y[sup]2[/sup] = 0 (mod m). Let r and s be minimal residues of x and y (mod m), such that -m/2 < r,s < m/2. r is congruent to x (mod m) and y is congruent to s (mod m). So, r[sup]2[/sup]+s[sup]2[/sup] = 0 (mod m). r and s cannot be both zero simultaneously, because if so, then m divides both x and y, so m[sup]2[/sup] divides x[sup]2[/sup]+y[sup]2[/sup] = mp, so m divides p. This is false since p is prime. Let r[sup]2[/sup]+s[sup]2[/sup] = nm. Since, -m/2 < r,s < m/2, so n < m. (x[sup]2[/sup]+y[sup]2[/sup])(r[sup]2[/sup]+s[sup]2[/sup]) = m[sup]2[/sup]np (xr+ys)[sup]2[/sup] + (xs - yr)[sup]2[/sup] = m[sup]2[/sup]np Since x and r belong to the same residue class (mod m), and so does y and s, m divides (xr+ys), since x[sup]2[/sup]+y[sup]2[/sup] = 0 (mod m), m also divides (xs-yr) = (xy-yx) mod m = 0 (mod m). Let (xr+ys) = am, and that (xs-yr) = bm, then a[sup]2[/sup]m[sup]2[/sup] + b[sup]2[/sup]m[sup]2[/sup] = m[sup]2[/sup]np or that, a[sup]2[/sup] + b[sup]2[/sup] = np, where n < m. This says that there exist integers a, b such that a[sup]2[/sup]+b[sup]2[/sup] = np, where n<m. We can keep continuing this descent until we get some integers u and v such that u[sup]2[/sup]+v[sup]2[/sup] = p, where p is a prime of form 1 (mod 4). 6) Next we have to prove such representation is unique. Let N = a[sup]2[/sup]+b[sup]2[/sup] = c[sup]2[/sup]+d[sup]2[/sup], with two distinct sum of two squares representation. Then N is composite. Proof: Since even number other than 2 is composite, we will consider only the case when N is odd. 2 has only one such representation, by the way. If N is odd. One of a,b is odd, and so is c,d pair as well. Let a,c be odd. b,d be even. Let a>c, then b<d. Since we have that a[sup]2[/sup]+b[sup]2[/sup] = c[sup]2[/sup]+d[sup]2[/sup] thus, a[sup]2[/sup]-c[sup]2[/sup] = d[sup]2[/sup]-b[sup]2[/sup] (a-c)(a+c) = (d-b)(d+b) where a-c, a+c, d-b, d+b are all even. Let gcd(a-c,d-b) = g, where g is clearly even. Let a-c = ug, d-b = vg, where gcd(u,v)=1. Then, ug(a+c) = vg(d+b), u(a+c) = v(d+b). So u divides d+b, v divides a+c. Let a+c = tv. Putting that, then it becomes that d+b = tu. Since that gcd(u,v)=1 and a+c and d+b are both odd, hence that t is being even only. So, 2N = a[sup]2[/sup] + b[sup]2[/sup] + c[sup]2[/sup] + d[sup]2[/sup] 4N = 2a[sup]2[/sup] + 2c[sup]2[/sup] + 2b[sup]2[/sup] + 2d[sup]2[/sup] 4N = (a+c)[sup]2[/sup] + (a-c)[sup]2[/sup] + (d+b)[sup]2[/sup] + (d-b)[sup]2[/sup] 4N = t[sup]2[/sup]v[sup]2[/sup] + u[sup]2[/sup]g[sup]2[/sup] + t[sup]2[/sup]u[sup]2[/sup] + v[sup]2[/sup]g[sup]2[/sup] 4N = (t[sup]2[/sup]+g[sup]2[/sup])(u[sup]2[/sup]+v[sup]2[/sup]) N = ((t/2)[sup]2[/sup]+(g/2)[sup]2[/sup])(u[sup]2[/sup]+v[sup]2[/sup]) Since t and g are both odd, so we have that (t/2) and (g/2) are both integers. So, N is representable as product of two integers, both being clearly > 1 only. Thus, N is composite. EVERY PRIME OF FORM 1 (MOD 4) CAN BE UNIQUELY REPRESENTED AS SUM OF TWO SQUARES. 7) It is also given in the book that every number that is not of form 4[sup]b[/sup](8c+7) can be represented as sum of three squares. 8) Regarding number of ways of representing an arbitrary value of N as sum of two squares: Since (a[sup]2[/sup]+b[sup]2[/sup])(c[sup]2[/sup]+d[sup]2[/sup]) = (ac+bd)[sup]2[/sup] + (ad-bc)[sup]2[/sup] = (ac-bd)[sup]2[/sup] + (ad+bc)[sup]2[/sup] The product of two distinct primes of form 1 (mod 4) can be represented as sum of two squares in two ways. Pending exercise to prove that these are the only ways of such representation. Why is it so? Continuing up in this way, it is certainly possible to see that the product of k distinct primes of form 1 (mod 4) can be represented in 2[sup]k-1[/sup] ways. Only that much? Sure about that? 9) Regarding product with a power of 2 will not change the number of ways of representation at all: This is because of the fact that 2(a[sup]2[/sup]+b[sup]2[/sup]) = (a+b)[sup]2[/sup] + (a-b)[sup]2[/sup] Continuing this up only, we will get that 4(a[sup]2[/sup]+b[sup]2[/sup]) = (2a)[sup]2[/sup] + (2b)[sup]2[/sup] Are these the only ways of such representation? Sure enough already? Only this much?[/QUOTE] [I][COLOR="Silver"]( ... seems to us that [a, b, c, d], they play as much as [b, d, p, q] )[/COLOR][/I]. |
[QUOTE=wblipp;203675]You may find it helpful to know that the product of two numbers that are a sum of squares is again a sum of squares:
(a[sup]2[/sup] + b[sup]2[/sup]) * (x[sup]2[/sup] + y[sup]2[/sup]) = (ax+by)[sup]2[/sup] + (ay-bx)[sup]2[/sup] This pretty little formula has a simple generalization for numbers of the form a[sup]2[/sup]+nb[sup]2[/sup] (n fixed; n=1 above)[/QUOTE] I find myself a bit reluctant to see this thread go just yet without taking note of the many people that have stepped on its' path and how far their steps traveled. One book on my shelf is Harvey Cohn's Advanced Number Theory. On page 2 of the introduction he tells me [QUOTE]The first step in the general theory of quadratic diophantine equations was probably the famous theorem of Fermat (1640) relating to a (homogeneous) form in x, y. A prime number is representable in an essentially unique manner by the form x[sup]2[/sup] + y[sup]2[/sup] for integral x and y if and only if p is congruent to 1 modulo 4 (or p = 2). [...] Fermat used an identity from antiquity (x[sup]2[/sup] + y[sup]2[/sup])(x'[sup]2[/sup] + y'[sup]2[/sup]) = (xx' - yy')[sup]2[/sup] + (xy' + x'y)[sup]2[/sup], easily verifiable since both sides equal x[sup]2[/sup]x'[sup]2[/sup] + y[sup]2[/sup]y'[sup]2[/sup] + x'[sup]2[/sup]y[sup]2[/sup] + x[sup]2[/sup]y'[sup]2[/sup]. He used this formula to build up solutions to the equation x[sup]2[/sup] + y[sup]2[/sup] = m for values of m which are not necessarily prime.[/QUOTE]It then goes on to tell me that Fermat's result generalized slightly to allow x and y not relatively prime is stated more compactly (and generalizing slightly to allow x and y not relatively prime) as Q(x,y) = m. This is interesting for what follows: [QUOTE]Let Q(x,y) = x[sup]2[/sup] + y[sup]2[/sup] Then all relatively prime solutions to the problem of representing Q(x,y) = m for any integer are achieved by the successive application of two results called the Genus Theorem and the Composition Theorem [...] In the intervening years until about 1800, Euler, Lagrange, Legendre, and others invented analogous results for a variety of quadratic forms. Gauss (1800) was the first on to see the larger problem and achieve a main result that is too involved even to state here[/QUOTE] Well last little bit is really saying something (at least to me) because this book always requires a cup of coffee and still generates a headache. Wblip's comment about the generalization intrigued me so I did a little online searching and was a bit surprised at the directions some of it led. First [URL="http://en.wikipedia.org/wiki/Proofs_of_Fermat%27s_theorem_on_sums_of_two_squares"]Proofs of Fermat's theorem on sums of two squares [Wikipedia][/URL][QUOTE]Fermat's theorem on sums of two squares asserts that an odd prime number p can be expressed as p = x[sup]2[/sup] + y[sup]2[/sup] with integer x and y if and only if p is congruent to 1 (mod 4). The statement was announced by Fermat in 1640, but he supplied no proof. The "only if" clause is easy: a perfect square is congruent to 0 or 1 modulo 4, hence a sum of two squares is congruent to 0, 1, or 2. An odd prime number is congruent to either 1 or 3 modulo 4, and the second possibility has just been ruled out. The first proof that such a representation exists was given by Leonhard Euler in 1747 and was quite complicated. Since then, many different proofs have been found. Among them, the proof using Minkowski's theorem about convex sets and Don Zagier's stunningly short proof based on involutions especially stand out. [QUOTE]Contents * 1 Euler's proof by infinite descent * 2 Lagrange's proof through quadratic forms * 3 Dedekind's two proofs using Gaussian integers * 4 Zagier's "one-sentence proof"[/QUOTE][/QUOTE] I look at bit further at the identity wblipp mentioned and learn that it is [URL="http://en.wikipedia.org/wiki/Brahmagupta-Fibonacci_identity"]"Brahmagupta's identity, also sometimes called Fibonacci's identity"[/URL] which tells me that "The identity is a special case (n = 2) of Lagrange's identity" I think that this n is the exponent and not the second term coefficient that wblipp mentioned so perhaps I have stepped a bit astray. Then I read that Lagrange's identity is itself "a special form of the Binet–Cauchy identity" (to which I then look). This mentions in passing "Lagrange's identity, which is a stronger version of the Cauchy–Schwarz inequality for the Euclidean space." Well, even I have heard of the Cauchy-Schwarz inequality, so I know that I have spanned a great deal of mathematics with all these little steps. Or then again I might be thinking about "Schwarz-Christoffel" but anyway I am sure that I am not in Kansas anymore. And these steps have skirted an elephant in the room (I presume): Quadratic Reciprocity. That is Chapter 11 in Harvey Cohn's book. This scares me a bit because I feel some would say that all of this would best [I]start[/I] there. |
[QUOTE=only_human;205022]I think that this n is the exponent and not the second term coefficient that wblipp mentioned so perhaps I have stepped a bit astray.[/QUOTE]
I was thinking of closure under multiplication of numbers of the form a[sup]2[/sup]+k*b[sup]2[/sup] with k fixed. Easily shown by [CENTER](a[sup]2[/sup]+k*b[sup]2[/sup]) * (x[sup]2[/sup]+k*y[sup]2[/sup]) = (ax+kby)[sup]2[/sup] + k (ay-bx)[sup]2[/sup] = (ax-kby)[sup]2[/sup] + k (ay+bx)[sup]2[/sup][/CENTER] |
a minor tidbit of a puzzle
[QUOTE=wblipp;205083]I was thinking of closure under multiplication of numbers of the form a[sup]2[/sup]+k*b[sup]2[/sup] with k fixed. Easily shown by
[CENTER](a[sup]2[/sup]+k*b[sup]2[/sup]) * (x[sup]2[/sup]+k*y[sup]2[/sup]) = (ax+kby)[sup]2[/sup] + k (ay-bx)[sup]2[/sup] = (ax-kby)[sup]2[/sup] + k (ay+bx)[sup]2[/sup][/CENTER][/QUOTE] Thank you, I was wondering about that. As one might notice, my approach to mathematics is really more like a survey with wonder but not much real work. In this vein, I noticed something about odd squares that I don't recall ever hearing explicitly mentioned. It doesn't merit a thread or any real work but I present it as a minor tidbit of a puzzle: As I mentioned earlier in the thread, the binary representation of an odd integer squared ends with "001." For the puzzle, we lop this invariant portion off the representation and consider what is left. To avoid quibbles I prefer to skip 1[sup]2[/sup]. In sequence the next would be 3 squared followed by 5 squared... Looking at the binary representations of the squares these are 1001 and 11001... After lopping off the "001" tail these numbers are "1" and "11" in binary. So looking at all of the "trimmed" numbers, what are they often called? |
[quote]
prev&=0 FOR i& = 3 TO 9999 STEP 2 j& = (i& ^ 2) j& = INT(j& / 8) PRINT i&, j&, j& - prev& prev& = j& NEXT i& [/quote] That should work in QBASIC. Here's some C++ code to do roughly the same thing. Obviously a snippet. Add headers, etc. yourself. [quote] int i=0, j=0, prev=0, diff=0; for(i=3; i<10000; i+=2){ j=(i/8) * i; diff=prev - j; cout << "odd integer: " << i << "\t right-shifted square: " << j << "\t difference: " << diff << endl; } [/quote] Recognize the pattern? ;) ::EDIT:: If you want a proof, consider the property of (n+1)^2-n^2 = n^2+2n+1-n^2 = 2n+1 |
| All times are UTC. The time now is 05:12. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.