Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I noticed that

$3^2+4^2+15^2=9^2+13^2$

and also

$3+4+15=9+13$

Is there an easy way to find all pairs of disjoint sets of positive integers whose sum are the same and whose sum of squares are the same? How common are they?

share|improve this question
    
I can't find any good tags for this problem. I tried pythagorean triples, pythagorean sums, anything starting with pytha, but nothing came up –  dspyz Apr 22 '13 at 3:00
    
what's special with $3,4,15,9,13$? –  Next Apr 22 '13 at 3:32
    
I want to know a way of generating all pairs of sets like {{3,4,15},{9,13}} that have the property that they have the same sum and also the same sum of squares –  dspyz Apr 22 '13 at 4:12
2  
Here is a link en.wikipedia.org/wiki/… –  Next Apr 22 '13 at 8:31

3 Answers 3

up vote 2 down vote accepted

It is easy to generate two such sets of arbitrary length. Let us choose $s_1,s_2,\ldots,s_{n-1}$ and $t_1,t_2,\ldots,t_{m-1}$ fairly freely and write $$ \begin{array}{cc} \sigma_1 = \sum_{i=1}^{n-1} s_i &~& \sigma_2 = \sum_{i=1}^{n-1} s_i^2 \\ \tau_1 = \sum_{i=1}^{m-1} t_i &~& \tau_2 = \sum_{i=1}^{m-1} t_i^2 \\ \end{array} $$ and then try to see if we can choose $s_n,t_m$ to augment our lists and satisfy the desired criterion, that is $$ \begin{align} \sigma_1-\tau_1 &= t_m-s_n \\ \sigma_2-\tau_2 &= t_m^2-s_n^2 \\ &=(t_m-s_n)(t_m+s_n) \\ &=(\sigma_1-\tau_1)(t_m+s_n) \end{align} $$ The easiest case is if $|\sigma_1-\tau_1|=1$ and $\sigma_2-\tau_2$ is odd, then we can choose $s_n,t_m=\frac{1}{2}(|\sigma_2-\tau_2|\pm 1)$.

For example for $n=11,m=8$, let $\{s_i\}_{i=1}^{10} = \{1,2,3,5,8,13,21,34,55,89\}$, $\{t_i\}_{i=1}^7=\{4,9,16,25,36,49,93\}$ where we have picked $t_7=93$ to achieve $\tau_1=232=\sigma_1+1$ because we will have $\tau_2>\sigma_2$.

Then $\tau_2-\sigma_2 = 509$, so let $s_{11}=255,t_8=254$ to get

$$\small 1+2+3+5+8+13+21+34+55+89+255=4+9+16+25+36+49+93+254=486 $$ $$ 1^2+2^2+3^2+5^2+8^2+13^2+21^2+34^2+55^2+89^2+255^2 \\ =4^2+9^2+16^2+25^2+36^2+49^2+93^2+254^2 = 77840 $$

In order to get every solution you'll have to consider any possible value of $d=|\sigma_1-\tau_1|$, and sets for which at least

  • $d$ divides $|\sigma_2-\tau_2|$
  • $(\sigma_2-\tau_2)/d \equiv d\pmod{2}$, since they sum to $2t_m$
  • after adding $s_n,t_m$ the sets are still disjoint

and if you want to count without repetition then only include new solutions when $s_n$ and $t_m$ are the maximums of their respective sets.

share|improve this answer

I don't know that this is a complete parametrization, but if one takes any $y,z$ and then puts $x=(1+y)(1+z)$ and also $a=y+z+yz$ and $b=1+y+z$, one has $$x+y+z=a+b,\\ x^2+y^2+z^2=a^2+b^2.$$ Of course one can permute the formulas and get others; maybe someone can show this list is complete (I'll try for that). By the way I used maple12's "isolve" to get this parametric solution, and in general isolve is not guaranteed to get all solutions.

share|improve this answer

set of equations:

$\left\{\begin{aligned}&x+y+z=a+b\\&x^2+y^2+z^2=a^2+b^2\end{aligned}\right.$

Solutions and can be written as follows.

$x=t+qk+qt+k$

$y=t$

$z=qk$

$a=t+qk+k$

$b=t+qk+qt$

And more:

$z=kq$

$y=(k+q+t)^2$

$x=t^2+kq+tk+qt$

$a=k^2+2qk+t^2+qt+2kt$

$b=q^2+2qk+t^2+2qt+kt$

$k,t,q$ - are integers and can be any mark.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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