Timeline for Enumerating ways to decompose an integer into the sum of two squares
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 17, 2018 at 18:23 | comment | added | Mark Bennet | @GHfromMO Indeed it is, I just wanted to highlight the fact in a comment, because there is a solution missing from the original post - the correct formula counts it. The question was linked from Math Stackexchange and I didn't want any misconceptions from people following the link. | |
Feb 17, 2018 at 18:12 | comment | added | GH from MO | @MarkBennet: The formula under the link I gave is correct. Consider (15) for $n=4$. We have $a_0=2$, $a_i=0$ for $i>0$, $b_j=0$. So $B=1$ in (16), and $r_2(n)=4$ in (18). In short, the link says $r_2(4)=4$, not $r_2(4)=5$. If you wanted to criticize KalEl's post, direct your remark to him/her. | |
Feb 17, 2018 at 8:11 | comment | added | Mark Bennet | @GHfromMO The formula linked there adds $1$ to the value at $4$ above when the $n_k$ are even for $k\gt 0$ and $a_0=1$, as is the case in the original question, and gives five solutions not four - there is a solution with two equal squares which is missed in OP. | |
Sep 2, 2015 at 3:32 | comment | added | john | @KalEl please post the python code. I would like to try this . | |
May 14, 2015 at 2:02 | history | edited | KalEl | CC BY-SA 3.0 |
Corrected - see Gerry's comment below.
|
May 14, 2015 at 2:00 | comment | added | KalEl | Gerry - you are right! Corrected it. Anyone looking for the enumeration algorithm, it will be clear at once if you see how the counting formula works. If you need it I can share my Python code. | |
May 12, 2015 at 23:17 | comment | added | Gerry Myerson | As you are counting decompositions of the form $0^2+a^2$, shouldn't a power of 4 return 1, not 0? | |
May 12, 2015 at 15:54 | comment | added | GH from MO | This is classical and can be found in many textbooks. See e.g. mathworld.wolfram.com/SumofSquaresFunction.html | |
May 12, 2015 at 15:05 | history | answered | KalEl | CC BY-SA 3.0 |