[math-fun] sum of 2 triangular numbers is a triangular number
Let T(i) = i(i+1)/2. Given n, let k be smallest number such that T(n) + T(k) = T(m) for some m. The k and m values are in A082183 and A082184. It must be classical that k and m always exist. - can someone supply a reference or a proof? The graph of the k values is quite irregular. Is there an upper bound?
I think that k = T(n) - 1 is an upper bound. T(k) makes a huge triangle; all the elements of the T(n) triangle can be thinly plated onto the side of the big one as a single additional row, producing T(k+1), so m = k+1. I think m-k would also make an interesting sequence. On Wed, Feb 19, 2020 at 12:35 PM Neil Sloane <njasloane@gmail.com> wrote:
Let T(i) = i(i+1)/2. Given n, let k be smallest number such that T(n) + T(k) = T(m) for some m. The k and m values are in A082183 and A082184. It must be classical that k and m always exist. - can someone supply a reference or a proof?
The graph of the k values is quite irregular. Is there an upper bound? _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
My quick search suggests that k = T(n)/2 seems to be an upper bound. It looks like this boundary will be reached when m = k+1, for example, (n,k,m) = (7,27,28), (16,135,136), and (31,495,496). Kerry On Wed, Feb 19, 2020 at 10:46 AM Allan Wechsler <acwacw@gmail.com> wrote:
I think that k = T(n) - 1 is an upper bound. T(k) makes a huge triangle; all the elements of the T(n) triangle can be thinly plated onto the side of the big one as a single additional row, producing T(k+1), so m = k+1. I think m-k would also make an interesting sequence.
On Wed, Feb 19, 2020 at 12:35 PM Neil Sloane <njasloane@gmail.com> wrote:
Let T(i) = i(i+1)/2. Given n, let k be smallest number such that T(n) + T(k) = T(m) for some m. The k and m values are in A082183 and A082184. It must be classical that k and m always exist. - can someone supply a reference or a proof?
The graph of the k values is quite irregular. Is there an upper bound? _______________________________________________ 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
Observe that: 0 < a_n = m^2 - n^2 - k^2 = n + k - m < n for all data of A082184, or if you want, this identity can also be written: 0 < m - k < n, 0 < m < n + k. I did not prove, but would guess that this identity, a generalization of the triangle inequality, holds throughout. The sequence of a_n = n + k - m, a_n: 1, 2, 3, 2, 3, 6, 5, 3, 5, 7, 8, 6, 4, 10, 15, 8, 9, 14, 5, 7 . . . (NaN) seems a preferable choice for characterizing and analyzing irregularity. In plain language, it can be described as the distance of (n,k,m) from a Pythagorean triple. Maybe there is some way to relate this to Pythagorean Triples? --Brad On Wed, Feb 19, 2020 at 11:46 AM Allan Wechsler <acwacw@gmail.com> wrote:
I think that k = T(n) - 1 is an upper bound. T(k) makes a huge triangle; all the elements of the T(n) triangle can be thinly plated onto the side of the big one as a single additional row, producing T(k+1), so m = k+1. I think m-k would also make an interesting sequence.
On Wed, Feb 19, 2020 at 12:35 PM Neil Sloane <njasloane@gmail.com> wrote:
Let T(i) = i(i+1)/2. Given n, let k be smallest number such that T(n) + T(k) = T(m) for some m. The k and m values are in A082183 and A082184. It must be classical that k and m always exist. - can someone supply a reference or a proof?
The graph of the k values is quite irregular. Is there an upper bound? _______________________________________________ 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
Let Q be the largest odd number dividing T(n) and satisfying Q*(Q+1)/2 < T(n). Then T(n) is the sum of Q consecutive integers, the last Q rows of the triangle T(m) with m = T(n)/Q + (Q-1)/2, giving k <= T(n)/Q - (Q-1)/2 -1. But this is not tight, for n=9 it gives a(9) <= 6 when in fact a(9) = 4. On Wed, Feb 19, 2020 at 11:46 AM Brad Klee <bradklee@gmail.com> wrote:
Observe that: 0 < a_n = m^2 - n^2 - k^2 = n + k - m < n for all data of A082184, or if you want, this identity can also be written: 0 < m - k < n, 0 < m < n + k.
I did not prove, but would guess that this identity, a generalization of the triangle inequality, holds throughout.
The sequence of a_n = n + k - m,
a_n: 1, 2, 3, 2, 3, 6, 5, 3, 5, 7, 8, 6, 4, 10, 15, 8, 9, 14, 5, 7 . . . (NaN)
seems a preferable choice for characterizing and analyzing irregularity. In plain language, it can be described as the distance of (n,k,m) from a Pythagorean triple.
Maybe there is some way to relate this to Pythagorean Triples?
--Brad
On Wed, Feb 19, 2020 at 11:46 AM Allan Wechsler <acwacw@gmail.com> wrote:
I think that k = T(n) - 1 is an upper bound. T(k) makes a huge triangle; all the elements of the T(n) triangle can be thinly plated onto the side
of
the big one as a single additional row, producing T(k+1), so m = k+1. I think m-k would also make an interesting sequence.
On Wed, Feb 19, 2020 at 12:35 PM Neil Sloane <njasloane@gmail.com> wrote:
Let T(i) = i(i+1)/2. Given n, let k be smallest number such that T(n) + T(k) = T(m) for some m. The k and m values are in A082183 and A082184. It must be classical that k and m always exist. - can someone supply a reference or a proof?
The graph of the k values is quite irregular. Is there an upper bound? _______________________________________________ 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
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
Elegant proof: The two sets, S1 = { (n,k,m) in Z^3 : n*(n+1) + k*(k+1) - m*(m+1) = 0 } S2 = { (x,y,z) in (2Z+1)^3 : x^2 + y^2 - z^2 - 1 = 0 } are equivalent under change of coordinates (x,y,z) = 2(n,k,m)+1. From the condition of S2 and the triangle inequality, x + y >= sqrt(z^2+1) > z. This implies n + k > m - 1/2. Over Z^3, we may round to the next integer, thus n + k >= m, but equality can only be achieved when n=k=m=0. Choosing some particular value of x, we are looking for the intersection of an odd-integer lattice with a hyperbola. Generally, this is the same situation as in the case of Pythagorean triples. I don't know how to finish the proof just now, but think that an integer-curve theorist probably could. Also compare the following: http://mathworld.wolfram.com/PythagoreanTriple.html https://0x0.st/iKud.png ( blue: Pythagorean triples, red: triangle triples ) --Brad On Wed, Feb 19, 2020 at 12:52 PM Brad Klee <bradklee@gmail.com> wrote:
I did not prove, but would guess that . . .
Here, apparently, is the missing computer code (Mathematica): RichTriples[TNn_] := Sort[Select[{TNn, k, m} /. Solve[MapThread[#1 == #2 &, {{TNn (TNn + 1)/#, #}, {(m + k + 1), (m - k)}}] ][[1]] & /@ Complement[Divisors[TNn (TNn + 1)][[2 ;; -2]], {TNn}], And[And @@ (IntegerQ /@ #), And @@ (# > 0 & /@ #)] &]] SymTriples[sqNn_] := Sort[Select[({sqNn, k, m} - 1)/2 /. Solve[MapThread[#1 == #2 &, {{(sqNn^2 - 1)/#, #}, {(m - k), (m + k)}}] ][[1]] & /@ Divisors[sqNn^2 - 1][[2 ;; -2]], And[And @@ (IntegerQ /@ #), And @@ (# > 0 & /@ #)] &]] Position[RichTriples /@ Range[2, 200], {}][[All, 1]] /. x_Integer :> {x + 1, x + 2} SymTriples[2 # + 1] & /@ Range[2, 20]; %[[All, 1, 2]] Out[1] = {{2, 3}, {3, 4}, {4, 5}, {7, 8}, {16, 17}, {31, 32}, {127, 128}} Out[2] = {2, 5, 9, 3, 5, 27, 10, 4, 8, 14, 17, 9, 5, 21, 135, 12, 14, 35, 6} Absence of fail cases in symmetric form follows from odd + 1 = even, not prime. I did not prove if the algorithm generates all of S2, nor if it includes all terms from OEIS, but it looks that way. Also interesting: Complement[SymTriples[2 # + 1], RichTriples[#]] & /@ Range[2, 50] Complement[RichTriples[#], SymTriples[2 # + 1]] & /@ Range[2, 50] --Brad On Wed, Feb 19, 2020 at 7:22 PM Brad Klee <bradklee@gmail.com> wrote:
Elegant proof: The two sets,
S1 = { (n,k,m) in Z^3 : n*(n+1) + k*(k+1) - m*(m+1) = 0 } S2 = { (x,y,z) in (2Z+1)^3 : x^2 + y^2 - z^2 - 1 = 0 }
Thanks to everyone who replied. Wow! In two days the problem was completely solved. I've prepared a summary of the upper bounds, which I will add to A082183 tomorrow. The original question was to find a bound for A082813. New sequences arising from the suggestions and comments are A332547, -548, -549, -552, -553, -554. Thanks, Allan, Brad, Michael, Rich. Brad, thanks also for the pointer to the "squares" version, A055527. It suggests that one should look at a general quadratic form (instead of n^2 or n*(n+1)) to really understand what is going on ...! Neil On Thu, Feb 20, 2020 at 10:34 AM Brad Klee <bradklee@gmail.com> wrote:
Here, apparently, is the missing computer code (Mathematica):
RichTriples[TNn_] := Sort[Select[{TNn, k, m} /. Solve[MapThread[#1 == #2 &, {{TNn (TNn + 1)/#, #}, {(m + k + 1), (m - k)}}] ][[1]] & /@ Complement[Divisors[TNn (TNn + 1)][[2 ;; -2]], {TNn}], And[And @@ (IntegerQ /@ #), And @@ (# > 0 & /@ #)] &]]
SymTriples[sqNn_] := Sort[Select[({sqNn, k, m} - 1)/2 /. Solve[MapThread[#1 == #2 &, {{(sqNn^2 - 1)/#, #}, {(m - k), (m + k)}}] ][[1]] & /@ Divisors[sqNn^2 - 1][[2 ;; -2]], And[And @@ (IntegerQ /@ #), And @@ (# > 0 & /@ #)] &]]
Position[RichTriples /@ Range[2, 200], {}][[All, 1]] /. x_Integer :> {x + 1, x + 2} SymTriples[2 # + 1] & /@ Range[2, 20]; %[[All, 1, 2]]
Out[1] = {{2, 3}, {3, 4}, {4, 5}, {7, 8}, {16, 17}, {31, 32}, {127, 128}} Out[2] = {2, 5, 9, 3, 5, 27, 10, 4, 8, 14, 17, 9, 5, 21, 135, 12, 14, 35, 6}
Absence of fail cases in symmetric form follows from odd + 1 = even, not prime. I did not prove if the algorithm generates all of S2, nor if it includes all terms from OEIS, but it looks that way. Also interesting:
Complement[SymTriples[2 # + 1], RichTriples[#]] & /@ Range[2, 50] Complement[RichTriples[#], SymTriples[2 # + 1]] & /@ Range[2, 50]
--Brad
On Wed, Feb 19, 2020 at 7:22 PM Brad Klee <bradklee@gmail.com> wrote:
Elegant proof: The two sets,
S1 = { (n,k,m) in Z^3 : n*(n+1) + k*(k+1) - m*(m+1) = 0 } S2 = { (x,y,z) in (2Z+1)^3 : x^2 + y^2 - z^2 - 1 = 0 }
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
To say that the problem is "completely solved" may be an overstatement, since we haven't answered a fundamental question about the general quadratic case. If you count the output of SymTriples, it should equal the number of odd divisors of n*(n+1), less one: A309507[n_] := Subtract[Length[Select[Divisors[n + n^2], OddQ[#] &]], 1] A309507 /@ Range[2, 50] This code would be a good addition to OEIS; however, it is easy to doubt theorem five of the Tripathi paper ( https://www.fq.math.ca/Papers1/46_47-4/Tripathi.pdf ), because we already have two similar algorithms that give different output. The proof given for Theorem 5 doesn't say anything about (x-y)*(x+y) being, in some sense, a "complete factorization". If we adapted this style of proof to another less-symmetric algorithm, we could end up with a wrong theorem. By changing coordinates, we can always transform a similar quadratic problem to the form (x-y)*(x+y)=n, with some extra conditions on the divisors of (x,y,n). Is it always the case that the symmetric factorization is complete, i.e. that it's solution over divisors of n gives all possible solutions? I wouldn't be surprised if this question took more than two days to answer... --Brad On Fri, Feb 21, 2020 at 10:59 PM Neil Sloane <njasloane@gmail.com> wrote:
Thanks to everyone who replied. Wow! In two days the problem was completely solved. I've prepared a summary of the upper bounds, which I will add to A082183 tomorrow.
The original question was to find a bound for A082813. New sequences arising from the suggestions and comments are A332547, -548, -549, -552, -553, -554. Thanks, Allan, Brad, Michael, Rich.
Brad, thanks also for the pointer to the "squares" version, A055527. It suggests that one should look at a general quadratic form (instead of n^2 or n*(n+1)) to really understand what is going on ...!
Neil
On Thu, Feb 20, 2020 at 10:34 AM Brad Klee <bradklee@gmail.com> wrote:
Here, apparently, is the missing computer code (Mathematica):
RichTriples[TNn_] := Sort[Select[{TNn, k, m} /. Solve[MapThread[#1 == #2 &, {{TNn (TNn + 1)/#, #}, {(m + k + 1), (m - k)}}] ][[1]] & /@ Complement[Divisors[TNn (TNn + 1)][[2 ;; -2]], {TNn}], And[And @@ (IntegerQ /@ #), And @@ (# > 0 & /@ #)] &]]
SymTriples[sqNn_] := Sort[Select[({sqNn, k, m} - 1)/2 /. Solve[MapThread[#1 == #2 &, {{(sqNn^2 - 1)/#, #}, {(m - k), (m + k)}}] ][[1]] & /@ Divisors[sqNn^2 - 1][[2 ;; -2]], And[And @@ (IntegerQ /@ #), And @@ (# > 0 & /@ #)] &]]
Position[RichTriples /@ Range[2, 200], {}][[All, 1]] /. x_Integer :> {x + 1, x + 2} SymTriples[2 # + 1] & /@ Range[2, 20]; %[[All, 1, 2]]
Out[1] = {{2, 3}, {3, 4}, {4, 5}, {7, 8}, {16, 17}, {31, 32}, {127, 128}} Out[2] = {2, 5, 9, 3, 5, 27, 10, 4, 8, 14, 17, 9, 5, 21, 135, 12, 14, 35, 6}
Absence of fail cases in symmetric form follows from odd + 1 = even, not prime. I did not prove if the algorithm generates all of S2, nor if it includes all terms from OEIS, but it looks that way. Also interesting:
Complement[SymTriples[2 # + 1], RichTriples[#]] & /@ Range[2, 50] Complement[RichTriples[#], SymTriples[2 # + 1]] & /@ Range[2, 50]
--Brad
On Wed, Feb 19, 2020 at 7:22 PM Brad Klee <bradklee@gmail.com> wrote:
Elegant proof: The two sets,
S1 = { (n,k,m) in Z^3 : n*(n+1) + k*(k+1) - m*(m+1) = 0 } S2 = { (x,y,z) in (2Z+1)^3 : x^2 + y^2 - z^2 - 1 = 0 }
_______________________________________________ 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
Quoting Neil Sloane <njasloane@gmail.com>:
Let T(i) = i(i+1)/2. Given n, let k be smallest number such that T(n) + T(k) = T(m) for some m. The k and m values are in A082183 and A082184. It must be classical that k and m always exist. - can someone supply a reference or a proof?
The graph of the k values is quite irregular. Is there an upper bound? _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
2T(n) = 2T(m) - 2T(k) = m^2 + m - k^2 - k = (m-k) (m + k + 1) (m-k) and (m+k+1) are of opposite parity because their sum is 2m+1, which is odd. So, factor 2T(n) into the product of an odd number times an even number. One of these is m-k, and the other is m+k+1. 2T(n) = n^2 + n gives two obvious solutions, n * (n+1) and 1 * (n^2+n). Equating these to (m-k) * (m+k+1) gives the two "trivial" solutions k=0, m=n and k=T(n)-1, m=T(n). Unless n is a Mersenne prime, or n+1 is a Fermat prime, there will be a non-trivial odd divisor of n(n+1) other than 1, n, or n+1. Select the odd divisor d logarithmicly closest to n+.5 that isn't n or n+1. Let q be the quotient n(n+1)/q. Then m-k = min(d,q) and m+k+1 = max(d,q). Solve for k, which is the required minimum. Example: n=5, T(n)=15, 2T(n)=30 = 3*10, d=3, q=10, k=3, m=6, 15+6 = 21. Rich
This late at night I can’t remember which primes belong to whom, but think that you have found a nice algorithm here. I checked https://oeis.org/A055527 up to ten in my head, and a modified version of the factoring algorithm looks to work also for Pythagorean triples, though with every prime n a fail case. Example: n=10, 10^2=50*2, (50-2)/2=24, (50+2)/2=26. 10^2 + 24^2 -26^2 = 100 + (400 + 160 + 16) - (400 + 240 + 36) = 676 - 676 = 0. I don’t know how well this technique is known, but OEIS seems to be using brute force. Why shouldn’t A082183 cross-reference A055527? Wouldn’t it be easier to understand that way? —Brad
On Feb 19, 2020, at 11:03 PM, rcs@xmission.com wrote:
Quoting Neil Sloane <njasloane@gmail.com>:
Let T(i) = i(i+1)/2. Given n, let k be smallest number such that T(n) + T(k) = T(m) for some m. The k and m values are in A082183 and A082184. It must be classical that k and m always exist. - can someone supply a reference or a proof?
The graph of the k values is quite irregular. Is there an upper bound? _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
2T(n) = 2T(m) - 2T(k) = m^2 + m - k^2 - k = (m-k) (m + k + 1)
(m-k) and (m+k+1) are of opposite parity because their sum is 2m+1, which is odd.
So, factor 2T(n) into the product of an odd number times an even number. One of these is m-k, and the other is m+k+1. 2T(n) = n^2 + n gives two obvious solutions, n * (n+1) and 1 * (n^2+n). Equating these to (m-k) * (m+k+1) gives the two "trivial" solutions k=0, m=n and k=T(n)-1, m=T(n).
Unless n is a Mersenne prime, or n+1 is a Fermat prime, there will be a non-trivial odd divisor of n(n+1) other than 1, n, or n+1. Select the odd divisor d logarithmicly closest to n+.5 that isn't n or n+1. Let q be the quotient n(n+1)/q. Then m-k = min(d,q) and m+k+1 = max(d,q). Solve for k, which is the required minimum.
Example: n=5, T(n)=15, 2T(n)=30 = 3*10, d=3, q=10, k=3, m=6, 15+6 = 21.
Rich
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (6)
-
Allan Wechsler -
Brad Klee -
Kerry Mitchell -
Michael Collins -
Neil Sloane -
rcs@xmission.com