-1
$\begingroup$

Assume that :

x = (n^2-n)/2

y = ((n+1)^2)-(n+1))/2

n is an integer and n ≥ 0

Examples =

3(0) + 1 = 1

3(1) + 3 = 6

3(3) + 6 = 15

and so on.

$\endgroup$
1
  • $\begingroup$ Welcome to the Mathematica Stack Exchange. There is a parenthesis imbalance on y. When you remove it evaluate: 3 x + y // Simplify and see if the sequence function generates triangular numbers. Thanks. $\endgroup$ Commented May 12, 2023 at 4:44

4 Answers 4

0
$\begingroup$

Welcome to StackExchange!

This can be proven by doing this:

Multiplying x's formula by 3 and,

Rewriting the formula for y since $(n+1)^2-(n+1)=n(n+1)=n^2+n$,

Writing them in one fraction since their denominators are the same,

We get $3n^2-3n+n^2+n\over2$$=$$2n^2-2n\over2$=$n^2-n\over2$$=$$n(n+1)\over2$ which is the main formula for triangular numbers.

Also, I believe this question is more fitting for math.stackexchange.com

$\endgroup$
1
  • 1
    $\begingroup$ Although the content is fine, this doesn't seem to involve any Mathematica code $\endgroup$ Commented May 12, 2023 at 16:31
4
$\begingroup$

Triangle numbers have form B = 1/2 m (1 + m). Now

x = (n^2 - n)/2;
y = ((n + 1)^2 - (n + 1))/2;
A = Assuming[Element[n, Integers] && n <= 0, Simplify[3*x + y]]

Mathematica graphics

So we just need to show that A is subset of B.

Reduce[(A == B) && n >= 0 && m >= 0, {n, m}, Integers]

Mathematica graphics

So the above says that only for integer values of n==(m + 1)/2 then n numbers are triangles.

rel = (m + 1)/2
Cases[Table[rel, {m, 0, 10}], x_ /; IntegerQ[x]]

Mathematica graphics

A /. n -> %

Mathematica graphics

The above are triangle numbers. They are subset of the numbers generated by B

Table[B, {m, 0, 10}]

Mathematica graphics

did you mean to ask this in the mathematics group? This is Mathematica forum with an a at the end instead of s.

$\endgroup$
3
$\begingroup$

May as well add another approach...

Block[
 {x = (n^2 - n)/2,
  y = ((n + 1)^2 - (n + 1))/2},
 Solve[3 x + y == Binomial[k, 2], k]
 ]
(*  {{k -> 1 - 2 n}, {k -> 2 n}}  *)

The question is clearly not about Mathematica, but since it's attracted so many Mma answers already, it's probably too late to migrate it.

$\endgroup$
2
$\begingroup$

Here is one easy approach

T[n_] := (n^2-n)/2;
3*T[n] + T[n+1] == T[2*n] //Simplify
(* True *)
$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.