Triangular Numbers that are odd, less than 2000

3k Views Asked by At

The diagram below shows the $1$st, $2$nd, $3$rd and $4$th triangular numbers.

(1 spot) : $1$

(3 spots) : $3$

(6 spots) : $6$

(10 spots) : $10$

The formula $n(n + 1)/2$ can be used to find the $n$th triangular number.

For example the fifth triangular number is

$5(5 + 1) / 2 = 5 \times 6 / 2 = 15$

How many of the triangular numbers that are less than $2000$ are odd?

My thought: So I can see a pattern here: $1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78 \ldots$. So after the first $3$ there is an equal number of odds and evens.

But that is a problematic way to calculate it. What is the easier way?

3

There are 3 best solutions below

9
On BEST ANSWER
  • $\dfrac{n(n+1)}{2}<2000 \implies n^2+n-4000<0 \implies n<\dfrac{-1+\sqrt{16001}}{2}\approx62.75$

  • $\dfrac{n(n+1)}{2}\not\equiv0\pmod2 \implies n(n+1)\not\equiv0\pmod4$

    $\implies [n\not\equiv0\pmod4]\wedge[(n+1)\not\equiv0\pmod4]$

    $\implies [n\not\equiv0\pmod4]\wedge[n\not\equiv3\pmod4]$

    $\implies [n\equiv1\pmod4]\vee[n\equiv2\pmod4]$

  • Therefore $n\in\{1,2,5,6,9,10,\dots,61,62\}$

  • Hence there are $\dfrac{62}{2}+1=32$ odd triangular numbers smaller than $2000$

3
On

Note that amongst the even numbers, multiples of $4$ alternate with multiples of $2$ which are not multiples of $4$.

If the even number out of $n$ and $n+1$ is a multiple of $4$, the triangle number will be even, otherwise it will be odd.

You can use this to show rigorously that pairs of odd triangle numbers alternate with pairs of even triangle numbers. Then you simply have to check what happens at the beginning of the list and at the end of the list to adjust for the boundary effects.

I don't know why you think that is a problematic way to calculate - it would also work for $2,000,000$ for example.

0
On

Let's take the number to be: $$N=\frac {n(n+1)}2$$ If it is odd it must not be divisible by two, so $n(n+1)$ must be divisible by 2 only once. As when we take two consequtive numbers one of them must be even always, so, suppose:

Case I

$n$ is even and divisible by two only once, then $n+1$ must be odd;

Possible numbers are: $2,2\times3,2\times5,2\times7,...$

Or put it other ways it is of the form $2\times p$ where $p$ is a prime no., the pattern to which is not possible.

CaseII

Consider similiarly (n+1)...