How come, for any n > 2, the nth triangular number + the nth square

  • Thread starter goldust
  • Start date
  • Tags
    Square
In summary, the conversation discusses the claim that the expression Tn + Sn = (n(3n+1))/2 is always composite (not prime) for all values of n greater than 2. The proof involves considering the cases of n being odd or even and showing that in both cases, the expression is a product of two integers and therefore composite. The conversation also addresses the need for the restriction n>2 in order for the proof to hold.
  • #1
goldust
89
1
number cannot be prime? I have checked this for n from 3 to 53,509, the latter being the limit for unsigned int. I believe this is true, and I thereby claim that this is a true statement. However, I don't see any obvious explanation for it.
 
Last edited:
Mathematics news on Phys.org
  • #2
The nth triangle number Tn is

[tex]T_n = \frac{n(n+1)}{2}[/tex]

and the nth square number Sn is

[tex]S_n = n^2[/tex]

And so
[tex]T_n+S_n = \frac{n(n+1)}{2}+n^2=\frac{n(3n+1)}{2}[/tex]

Can you now show why this expression must be composite (not prime) for all n?
 
  • #3
Can you now show why this expression must be composite (not prime) for all n?

Well, it wouldn't be true for all n. Only for n > 2, assuming my statement is correct. :biggrin:
 
  • #4
When n is odd and more than 2, 1 / 2 * (3n + 1) is a whole number bigger than 1, and so the result is composite. When n is even and more than 2, n * (3n + 1) is even, so (n / 2) * (3n + 1) is even. Therefore the sum is composite for all n > 2 is correct. :biggrin: Many thanks for the help.
 
Last edited:
  • #5
goldust said:
Well, it wouldn't be true for all n. Only for n > 2, assuming my statement is correct. :biggrin:

Well, ignoring the fact that you included the criteria that n>2 in your proof below, [itex]n\leq 2[/itex] would also spit out composite numbers, right? Your proof only considers that n is even or odd which means that all integers [itex]n\leq 2[/itex] would also be involved. The only reason to restrict yourself to n>2 is such that we have a meaningful square and triangle number.

goldust said:
When n is odd and more than 2, 1 / 2 * (3n + 1) is a whole number bigger than 1, and so the result is composite.
Adding to the end of that: because we then have a product of two integers, mainly n and [itex]\frac{3n+1}{2}[/itex].

goldust said:
When n is even and more than 2, n * (3n + 1) is even, so (n / 2) * (3n + 1) is even. Therefore the sum is composite for all n > 2 is correct. :biggrin: Many thanks for the help.

This is incorrect. If [itex]n(3n+1)[/itex] is even, then [itex]\frac{n}{2}(3n+1)[/itex] isn't necessarily even, but rather an integer. But most importantly, you haven't proven that the expression is a product of two integers and hence composite.Also, while it's not absolutely necessary, when you consider n to be even, you could let n=2k for some integer k and substitute that into your expression, then show that the result is composite, and similarly for n odd, let n=2k+1.
 
  • #6
Many thanks. :wink:
 
Last edited:
  • #7
Mentallic said:
Well, ignoring the fact that you included the criteria that n>2 in your proof below, [itex]n\leq 2[/itex] would also spit out composite numbers, right? Your proof only considers that n is even or odd which means that all integers [itex]n\leq 2[/itex] would also be involved. The only reason to restrict yourself to n>2 is such that we have a meaningful square and triangle number.
You do get a prime number for n=1 or n=2, and the proof also uses the fact that n>2, when it says
When n is odd and more than 2, 1 / 2 * (3n + 1) is a whole number bigger than 1,
so I don't see what the problem is here.
 
  • #8
Haha yeah I thought about it while out today and realized the criteria n>2 is necessary, which goldust even incorporated into his proof! Sorry about that goldust.
 
  • #9
Many thanks for the help! :biggrin: The proof is a bit trickier than I initially thought. :eek: When n is even and more than 2, n / 2 is an integer more than 1, and 3n + 1 is also an integer more than 1, so n / 2 * (3n + 1) ends up being divisible by both n / 2 and 3n + 1. Cheers! :biggrin:
 
Last edited:

What is a triangular number?

A triangular number is a number that can be represented as a triangle with a specific number of dots on each side. For example, the number 6 is a triangular number because it can be represented as a triangle with 6 dots on each side.

What is a square number?

A square number is a number that can be represented as a square with a specific number of dots on each side. For example, the number 4 is a square number because it can be represented as a square with 4 dots on each side.

What is the nth triangular number?

The nth triangular number is the sum of all the numbers from 1 to n. It can be represented as 1+2+3+...+n. For example, the 4th triangular number is 1+2+3+4 = 10.

What is the nth square number?

The nth square number is the result of multiplying n by itself. It can be represented as n*n. For example, the 4th square number is 4*4 = 16.

How can you add a triangular number and a square number?

To add a triangular number and a square number, we can use the formula Tn + Sn = (n*(n+1))/2 + n*n. For example, if n = 4, T4 + S4 = (4*5)/2 + 4*4 = 10 + 16 = 26.

Similar threads

Replies
35
Views
3K
Replies
1
Views
3K
  • Calculus and Beyond Homework Help
Replies
13
Views
2K
Replies
4
Views
924
Replies
41
Views
8K
  • General Math
Replies
13
Views
1K
Replies
7
Views
1K
Replies
5
Views
2K
Replies
5
Views
1K
Back
Top