A bisquare is a number which can be expressed as $p^2 + q^2$ where $p,q\in\mathbb{W} $. Given a number, how can you quickly tell if it is a bisquare or not? Is it even possible to do so without using the naive method?
Asked
Active
Viewed 738 times
1
-
http://math.stackexchange.com/a/153613/17976 – Mike May 16 '15 at 17:02
-
@Mike I'm not too sure I understand the answers there. I'm a bit of a newbie. If you'd tell me how to check, I'd be grateful. I should also close the question, right? – xrisk May 16 '15 at 17:08
-
No need to close until you have an answer you're satisfied with. I may or may not have time to give a full answer at the moment. – Mike May 16 '15 at 17:16
-
@Mike okay thanks. – xrisk May 16 '15 at 17:16
-
@xrisk What does $\mathbb W$ mean? – Erick Wong May 17 '15 at 05:01
1 Answers
3
The first step is to factor the number into primes. The primes which matter for this are those which are one less than a multiple of $4$ ($3,7,11,19,$ etc.). Now check the power of each of these primes. If any of the powers is odd, the number cannot be represented as the sum of $2$ squares.
I'll need to add more later I think.

Mike
- 13,318
-
Question: Is this a quick method? (as we know the factorization is not an easy task)? – Elaqqad May 16 '15 at 18:12
-
1@Elaqqad I don't think there is a faster way to verify that a number can be represented as the sum of 2 squares. There may however be certain cases that are easier to disprove. For example, any number which is one less than a multiple of 4 cannot be represented as the sum of 2 squares and a number is divisible by 4 if the last 2 digits are divisible by 4. So, for example, any number ending with the last 2 digits "19" can't be represented as the sum of 2 squares, no factorization needed. – Mike May 17 '15 at 01:01
-
@Mike, turns out there's a slight flaw in your method. Consider - 9 you would qualify it as a bisquare - because $9 = 3^2$. But $9=0^2 + 3^2$ and 0 isn't a natural number :p But it turns out that this is what I'd originally wanted. – xrisk May 17 '15 at 04:50
-
@xrisk To adjust the method to natural numbers only, just add the additional restriction that either the greatest power of $2$ dividing $n$ has odd exponent or there is at least one prime congruent to $1$ mod $4$ dividing $n$. – Erick Wong May 17 '15 at 04:59
-
@xrisk Yes, that's why I thought I might have to add more later. I think Erick Wong's method may provide a fix. – Mike May 17 '15 at 06:32
-
@Mike I don't need a fix. I later realized that I needed it for whole numbers and not natural numbers. I've edited the question too. – xrisk May 17 '15 at 06:49
-
@ErickWong just looking through this thread and I couldn’t understand this statement of yours "the greatest power of 2 dividing n has odd exponent” . Could you please explain how this applies to a number like 100 ? – xrisk Oct 06 '15 at 16:31
-
-
@ErickWong Yes, I understood the other possible condition, but could not understand the first one. And 2 and 5 divide 100. – xrisk Oct 06 '15 at 16:40
-
@RishavKundu Oh, you mean you couldn't understand the meaning. The highest power of $2$ which divides $100$ is $2^2$. The exponent is $2$, which is even, not odd. Therefore $100$ does not satisfy the first clause of the "or" condition. – Erick Wong Oct 06 '15 at 17:26
-
@RishavKundu However, your question was phrased very oddly. If you understand the second clause of the "or", then you must know that $100$ satisfies the condition. Wouldn't it make more sense to ask about $18$ or $36$? – Erick Wong Oct 06 '15 at 18:14