14
$\begingroup$

Is there positive integer $m$ such $m=x_1^2+x_2^2$ and $m=y_1^2+y_2^2+y_3^2$ where $x_i, y_j$ are nonzero integers. I have tried by hand for the ten natural numbers but I was not able to find such $m$.

Would be thankful for help.

$\endgroup$

closed as off-topic by user21820, Simply Beautiful Art, Jack, Dietrich Burde, user223391 Nov 27 '17 at 20:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – user21820, Simply Beautiful Art, Jack, Dietrich Burde, Community
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ repl.it/repls/FaithfulLazyAustraliankelpie $\endgroup$ – mathnoob123 Nov 25 '17 at 19:26
  • 3
    $\begingroup$ @mathnoob123: This one is more efficient, I think. $\endgroup$ – Kevin Nov 25 '17 at 20:13
  • 5
    $\begingroup$ Is there anything saying that all $x_i$ must be distinct from all $y_i$? $\endgroup$ – Todd Wilcox Nov 25 '17 at 23:23
  • 2
    $\begingroup$ @apnorton The linked answer is not great, the itertools example doesn't construct a tuple in the loop body (this is done behind the scenes) and avoids two list look-ups. Here's a Python 3 example which shows that explicit loops are faster. In practice, it rarely matters either way because the loop body is usually more expensive than the iteration (which was the inspiration for the original comment, but I didn't notice that the first example re-checked combos). $\endgroup$ – Jared Goguen Nov 26 '17 at 17:35
  • 2
    $\begingroup$ Pythagorean triples #1: (3,4,5) and #2 (5,12,13) have hypotenuse of the first as a side in the second, so 169 = 144 + 25 = 144 + 16 + 9. $\endgroup$ – Pieter Geerkens Nov 27 '17 at 5:50
58
$\begingroup$

Obviously, if there are any solutions to $a^2 =b^2 + c^2$, then you can add $x^2$ to both sides and get your $m$'s.

For example, $25 + x^2 = 9 + 16 + x^2$ for all natural numbers $x$.

You can even have $m$ be a perfect square AND a sum of two squares AND a sum of three squares (take $x=12$ above).

$\endgroup$
  • 1
    $\begingroup$ The equivalent for Pythagorean triples would be to start with a solution to $a^2=0$ and add $x^2$ to both sides. This does answer the question, but it would be reasonable to require that no integer appears on both sides of the equation. $\endgroup$ – Jack M Nov 26 '17 at 17:37
30
$\begingroup$

There is a possibly famous identity: $$\Large 10^2+11^2+12^2=13^2+14^2$$ which meets your criteria.

Here $m$ is $365$.

$\endgroup$
20
$\begingroup$

Alternatively you could use a formula to generate examples; for example

$$m=\left(a^2+b^2+c^2\right)^2+\left(a^2-c^2\right)^2=\left(a^2+c^2\right)^2+\left(2cb\right)^2+\left(a^2+b^2-c^2\right)^2$$

originating from the identity $$\left(a^2+b^2+c^2\right)^2-\left(a^2+b^2-c^2\right)^2=\left(2ca\right)^2+\left(2cb\right)^2$$ and using $$\left(a^2+c^2\right)^2-\left(a^2-c^2\right)^2=\left(2ca\right)^2$$

to substitute for $\left(2ca\right)^2$

$\endgroup$
  • $\begingroup$ Hmm looks elegant. How did you come up with? $\endgroup$ – ZFR Nov 25 '17 at 20:00
  • $\begingroup$ @RTZ: Updated post $\endgroup$ – James Arathoon Nov 25 '17 at 20:09
  • $\begingroup$ @RFZ It's a logical extension of an ancient parametrization for generating Pythagorean triads, $(u^2 - v^2)^2 + (2uv)^2 = (u^2 + v^2)^2$ $\endgroup$ – PM 2Ring Nov 26 '17 at 0:56
10
$\begingroup$

Combine the sequences A001481 and A000378. The positive integers appearing in both sequences are sum of two squares, and a sum of three squares, e.g., $$17=16+1=4+4+9$$

$\endgroup$
  • $\begingroup$ The first sequence is for sums of two DISTINCT squares. There was nothing about "distinct" in the question. And the second sequence you linked to is for sums of FOUR squares. (Which is why 17, your example, does not even appear in the second sequence.) $\endgroup$ – mathguy Nov 25 '17 at 19:26
  • 1
    $\begingroup$ Corrected. But distinct or not does not matter, because $17$ still is a valid example, and the OP just wanted "a sum" of two squares, resp. three squares. $\endgroup$ – Dietrich Burde Nov 25 '17 at 19:32
  • $\begingroup$ Understood; my point was, suppose there were no overlaps between the two lists, that wouldn't answer the original question. You proved existence in even more restrictive conditions that the OP had. $\endgroup$ – mathguy Nov 25 '17 at 19:34
  • 1
    $\begingroup$ Anyway, your first comment no longer applies. $\endgroup$ – Dietrich Burde Nov 25 '17 at 19:46
10
$\begingroup$

Here's a theoretical answer: any prime $p$ of the form $8k+1$ will work (this gives infinitely many examples, including the example of 17 in Dietrich's example).

Why is this true?

First, Fermat proved that any prime $p$ of the form $8k+1$ (in fact 1 mod 4) is of the form $x^2+y^2$. Being prime, it's not a square so both $x, y$ must be nonzero for $x^2+y^2=p$.

Second, Fermat also proved that any prime $p$ of the form $8k+1$ (in fact 1 or 3 mod 8) is of the form $x^2+2y^2$. Again, no prime can be of the form $x^2$ or $2y^2$, so we need both $x,y$ nonzero for $x^2+2y^2=p$. Then $p=x^2+y^2+z^2$ with $z=y$ and $x,y,z$ all nonzero.

$\endgroup$
  • $\begingroup$ And Dirichlet proved that there are infinitely many such primes. $\endgroup$ – B. Mehta Nov 26 '17 at 21:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.