Re: [math-fun] sum of 2 triangular numbers is a triangular number
I mentioned this on Feb 19 2020 and several people sent very helpful replies. For squares, we have the theorem that all solutions to x^2+y^2=z^2 in integers are given by Pythagorean triples, t*[u^2-v^2, 2uv, u^2+v^2]. Expanding on the replies from Michael Collins and Rich, it looks like the following is the analog for triangular numbers T_n = n(n+1)/2. ALL solutions to T_n+T_k=T_m are given by the list of what one might call Trithagorean triples: these are the triples [n,k,m] = [n, T/Q-(Q+1)/2,T/Q+(Q-1)/2] where n >= 2, T=n(n+1)/2, and Q is any odd divisor of T less than n, plus these triples with the first two coordinates swapped. I haven't found this in the literature, but it can hardly be new.
Are those just the "primitive" triples, so that one has to include k*[n,k,m] as well in order to get a complete list? Or does that form hit all triples? Also, does this procedure hit all triples just once, or are there occasions where different choices of n, Q, (and k?) give the same triple? On Thu, Feb 27, 2020 at 4:54 PM Neil Sloane <njasloane@gmail.com> wrote:
I mentioned this on Feb 19 2020 and several people sent very helpful replies.
For squares, we have the theorem that all solutions to x^2+y^2=z^2 in integers are given by Pythagorean triples, t*[u^2-v^2, 2uv, u^2+v^2].
Expanding on the replies from Michael Collins and Rich, it looks like the following is the analog for triangular numbers T_n = n(n+1)/2. ALL solutions to T_n+T_k=T_m are given by the list of what one might call Trithagorean triples: these are the triples
[n,k,m] = [n, T/Q-(Q+1)/2,T/Q+(Q-1)/2] where n >= 2, T=n(n+1)/2, and Q is any odd divisor of T less than n,
plus these triples with the first two coordinates swapped.
I haven't found this in the literature, but it can hardly be new. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
n*(n+1)/2 is not a homogeneous form, so multiplying by a constant is not allowed. There are duplicates though, for instance both 6,20,21 and 20,6,21 appear On Thu, Feb 27, 2020 at 6:23 PM Allan Wechsler <acwacw@gmail.com> wrote:
Are those just the "primitive" triples, so that one has to include k*[n,k,m] as well in order to get a complete list? Or does that form hit all triples? Also, does this procedure hit all triples just once, or are there occasions where different choices of n, Q, (and k?) give the same triple?
On Thu, Feb 27, 2020 at 4:54 PM Neil Sloane <njasloane@gmail.com> wrote:
I mentioned this on Feb 19 2020 and several people sent very helpful replies.
For squares, we have the theorem that all solutions to x^2+y^2=z^2 in integers are given by Pythagorean triples, t*[u^2-v^2, 2uv, u^2+v^2].
Expanding on the replies from Michael Collins and Rich, it looks like the following is the analog for triangular numbers T_n = n(n+1)/2. ALL solutions to T_n+T_k=T_m are given by the list of what one might call Trithagorean triples: these are the triples
[n,k,m] = [n, T/Q-(Q+1)/2,T/Q+(Q-1)/2] where n >= 2, T=n(n+1)/2, and Q is any odd divisor of T less than n,
plus these triples with the first two coordinates swapped.
I haven't found this in the literature, but it can hardly be new. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
Hi Neil, I think you may have missed this little piece of code: PythagoreanTriples[sqNn_] := Select[{sqNn, k, m} /. Solve[ MapThread[#1 == #2 &, {{(sqNn^2)/#, #}, {(m - k), (m + k)}}]][[1]] & /@ Divisors[sqNn^2][[1 ;; -1]], And[And @@ (IntegerQ /@ #), And @@ (# > 0 & /@ #)] &] (*https://oeis.org/A046079*) Length[PythagoreanTriples[#]] & /@ Range[2, 20] Out[] = {0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 4, 1, 1, 4, 3, 1, 2, 1, 4} If you hack out the part that says Solve[...] and maybe put a "d" in for the "#" sign, then you can get that [n,d/2-n^2/(2*d),d/2+n^2/(2*d)], with "d" for divisor. Just to double-check for possible typo, let's try: Expand[{n, d/2 - n^2/(2 d), d/2 + n^2/(2 d)} /. {x_, y_, z_} :>x^2 + y^2 - z^2] Out[]=0 Then, we can refine the idea of an "analog", Pythagorean : Trithagorean :: {n, d/2 - n^2/(2 d), d/2 + n^2/(2 d)} : {n, n*(n + 1)/d - (d + 2)/4, n*(n + 1)/d + (d - 2)/4}. The other relevant sequence is https://oeis.org/A309507, see my message from Sat. Feb 22. --Brad On Thu, Feb 27, 2020 at 3:54 PM Neil Sloane <njasloane@gmail.com> wrote:
I mentioned this on Feb 19 2020 and several people sent very helpful replies.
For squares, we have the theorem that all solutions to x^2+y^2=z^2 in integers are given by Pythagorean triples, t*[u^2-v^2, 2uv, u^2+v^2].
Expanding on the replies from Michael Collins and Rich, it looks like the following is the analog for triangular numbers T_n = n(n+1)/2. ALL solutions to T_n+T_k=T_m are given by the list of what one might call Trithagorean triples: these are the triples
[n,k,m] = [n, T/Q-(Q+1)/2,T/Q+(Q-1)/2] where n >= 2, T=n(n+1)/2, and Q is any odd divisor of T less than n,
plus these triples with the first two coordinates swapped.
I haven't found this in the literature, but it can hardly be new. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
Dear Grad, Trouble is, I don't speak Mathematica. Could you possibly translate what you said in that last email into human? Best regards Neil Neil J. A. Sloane, President, OEIS Foundation. 11 South Adelaide Avenue, Highland Park, NJ 08904, USA. Also Visiting Scientist, Math. Dept., Rutgers University, Piscataway, NJ. Phone: 732 828 6098; home page: http://NeilSloane.com Email: njasloane@gmail.com On Thu, Feb 27, 2020 at 10:46 PM Brad Klee <bradklee@gmail.com> wrote:
Hi Neil,
I think you may have missed this little piece of code:
PythagoreanTriples[sqNn_] := Select[{sqNn, k, m} /. Solve[ MapThread[#1 == #2 &, {{(sqNn^2)/#, #}, {(m - k), (m + k)}}]][[1]] & /@ Divisors[sqNn^2][[1 ;; -1]], And[And @@ (IntegerQ /@ #), And @@ (# > 0 & /@ #)] &]
(*https://oeis.org/A046079*) Length[PythagoreanTriples[#]] & /@ Range[2, 20] Out[] = {0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 4, 1, 1, 4, 3, 1, 2, 1, 4}
If you hack out the part that says Solve[...] and maybe put a "d" in for the "#" sign, then you can get that [n,d/2-n^2/(2*d),d/2+n^2/(2*d)], with "d" for divisor. Just to double-check for possible typo, let's try:
Expand[{n, d/2 - n^2/(2 d), d/2 + n^2/(2 d)} /. {x_, y_, z_} :>x^2 + y^2 - z^2] Out[]=0
Then, we can refine the idea of an "analog",
Pythagorean : Trithagorean :: {n, d/2 - n^2/(2 d), d/2 + n^2/(2 d)} : {n, n*(n + 1)/d - (d + 2)/4, n*(n + 1)/d + (d - 2)/4}.
The other relevant sequence is https://oeis.org/A309507, see my message from Sat. Feb 22. --Brad
On Thu, Feb 27, 2020 at 3:54 PM Neil Sloane <njasloane@gmail.com> wrote:
I mentioned this on Feb 19 2020 and several people sent very helpful replies.
For squares, we have the theorem that all solutions to x^2+y^2=z^2 in integers are given by Pythagorean triples, t*[u^2-v^2, 2uv, u^2+v^2].
Expanding on the replies from Michael Collins and Rich, it looks like the following is the analog for triangular numbers T_n = n(n+1)/2. ALL solutions to T_n+T_k=T_m are given by the list of what one might call Trithagorean triples: these are the triples
[n,k,m] = [n, T/Q-(Q+1)/2,T/Q+(Q-1)/2] where n >= 2, T=n(n+1)/2, and Q
is
any odd divisor of T less than n,
plus these triples with the first two coordinates swapped.
I haven't found this in the literature, but it can hardly be new. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
PS Brad, I was not trying to "diss"you, I simply did not understand what you were saying. I proposed a formula that seemed to give all the trythagorean triples. I'm quite willing to believe either of the following: You had already given that formula two days ago My formula is wrong, and you had given the correct formula two days ago! Best regards Neil Neil J. A. Sloane, President, OEIS Foundation. 11 South Adelaide Avenue, Highland Park, NJ 08904, USA. Also Visiting Scientist, Math. Dept., Rutgers University, Piscataway, NJ. Phone: 732 828 6098; home page: http://NeilSloane.com Email: njasloane@gmail.com On Thu, Feb 27, 2020 at 11:47 PM Neil Sloane <njasloane@gmail.com> wrote:
Dear Grad, Trouble is, I don't speak Mathematica. Could you possibly translate what you said in that last email into human?
Best regards Neil
Neil J. A. Sloane, President, OEIS Foundation. 11 South Adelaide Avenue, Highland Park, NJ 08904, USA. Also Visiting Scientist, Math. Dept., Rutgers University, Piscataway, NJ. Phone: 732 828 6098; home page: http://NeilSloane.com Email: njasloane@gmail.com
On Thu, Feb 27, 2020 at 10:46 PM Brad Klee <bradklee@gmail.com> wrote:
Hi Neil,
I think you may have missed this little piece of code:
PythagoreanTriples[sqNn_] := Select[{sqNn, k, m} /. Solve[ MapThread[#1 == #2 &, {{(sqNn^2)/#, #}, {(m - k), (m + k)}}]][[1]] & /@ Divisors[sqNn^2][[1 ;; -1]], And[And @@ (IntegerQ /@ #), And @@ (# > 0 & /@ #)] &]
(*https://oeis.org/A046079*) Length[PythagoreanTriples[#]] & /@ Range[2, 20] Out[] = {0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 4, 1, 1, 4, 3, 1, 2, 1, 4}
If you hack out the part that says Solve[...] and maybe put a "d" in for the "#" sign, then you can get that [n,d/2-n^2/(2*d),d/2+n^2/(2*d)], with "d" for divisor. Just to double-check for possible typo, let's try:
Expand[{n, d/2 - n^2/(2 d), d/2 + n^2/(2 d)} /. {x_, y_, z_} :>x^2 + y^2 - z^2] Out[]=0
Then, we can refine the idea of an "analog",
Pythagorean : Trithagorean :: {n, d/2 - n^2/(2 d), d/2 + n^2/(2 d)} : {n, n*(n + 1)/d - (d + 2)/4, n*(n + 1)/d + (d - 2)/4}.
The other relevant sequence is https://oeis.org/A309507, see my message from Sat. Feb 22. --Brad
On Thu, Feb 27, 2020 at 3:54 PM Neil Sloane <njasloane@gmail.com> wrote:
I mentioned this on Feb 19 2020 and several people sent very helpful replies.
For squares, we have the theorem that all solutions to x^2+y^2=z^2 in integers are given by Pythagorean triples, t*[u^2-v^2, 2uv, u^2+v^2].
Expanding on the replies from Michael Collins and Rich, it looks like
the
following is the analog for triangular numbers T_n = n(n+1)/2. ALL solutions to T_n+T_k=T_m are given by the list of what one might call Trithagorean triples: these are the triples
[n,k,m] = [n, T/Q-(Q+1)/2,T/Q+(Q-1)/2] where n >= 2, T=n(n+1)/2, and Q is any odd divisor of T less than n,
plus these triples with the first two coordinates swapped.
I haven't found this in the literature, but it can hardly be new. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (3)
-
Allan Wechsler -
Brad Klee -
Neil Sloane