Tuesday, September 29, 2009

Is zero a triangular number?



Neil Sloan's On-Line Encyclopedia of Integer Sequences, which everyone who works seriously (or recreationally) with integer sequences regards as the ultimate authority, lists the triangular numbers as sequence A000217, and unambiguously includes 0 as a triangular number:
0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990, 1035, 1081, 1128, 1176, 1225, 1275, 1326, 1378, 1431,...
It was brought to my attention that all the references on this blog to triangular numbers (and to all other polygonal numbers) have omitted the 0 and started at 1. Please bear this omission in mind when browsing these pages - sometimes you might want to add a zero to the beginning of the sequences (but sometimes maybe not).

I am consoled, only somewhat, by the fact that wikipedia and mathworld (two other august authorities on sequence-related matters) also omit the zero from their triangular number lists.

This reminds me of the age-old question:

Is zero a natural number?

Putting the definition of the natural numbers on the chalkboard is always dangerous - you risk having some student insist that your definition is wrong, wrong, wrong because they were taught that natural numbers included (or excluded) zero, and yours doesn't. It seems that most sources, including Sloan's OLEIS, say that 0 is not natural (see A000027).

I suspect that (most) mathematicians do not care (much) about this - they just redefine the term "natural number" to be what they need it to be at the moment they happen to be using it. If they need a zero, they add a zero, and move on.

Wikipedia suggests that when you encounter a situation where it might matter, one should use $\mathbb{N}_0$ when zero is to be included, and $\mathbb{N}$ when it isn't (or when it doesn't matter).

The comparison between the triangulars and the naturals is not spurious. Wikipedia defines the triangulars as sums of the naturals (I, somewhat strangely, tend to think of naturals as one-dimensional triangular numbers). If this is your chosen definition then you are likely not to include zero, and you might use this formula:
\[t_n = \sum^{n}_{i=1}i.\]
However, if we want to rehabilitate this particular formula for the triangulars + 0, we just need to adjust the index:
\[t_n = \sum^{n}_{i=0}i\]
What about other triangular number formulas? Can they all include zero too? Well, the simplest, $t_n = \frac{n(n+1)}{2}$ works just fine when you let $n=0$.

Sometimes, when we are thinking of how they relate to the binomial coefficients, we might want to use this formula:

\[t_n = \left( \begin{array}{c} n +1 \\2\end{array} \right) \]

This might give you pause, because when $n = 0$ we seem to be "out of bounds." Luckily we have:

\[\left(\begin{array}{c} n \\r \end{array}\right) = 0 \mbox{ for } r > n\]

Which is exactly what we need.

As far as the posts on this blog are concerned, the only way of expressing the triangulars that needs obvious modification in order to work for the triangulars + 0 is the generating function:

\[g(x) = \frac{1}{\left( 1-x \right)^{3}} = 1 +3x + 6x^2 + 10x^3 + ...\]

which gives the triangulars as in the coefficients on the right hand side. To have a generating function for the triangulars + 0 you need to modify this to be:

\[g(x) = \frac{x}{\left( 1-x \right)^{3}} = 0 +x +3x^2 + 6x^3 + 10x^4 + ...\]

Multiplying by $x$ is the generating-function equivalent to shifting indexes, which is what we had to do for our first formula.

Thanks to Alexander Povolotsky for bringing these issues to light.

5 comments:

  1. Think of it this way: There are two sets:

    The symbols we use to rank things: first, second third, etc. These are the finite ordinal numbers and they are isomorphic to the natural numbers without zero.

    The symbols we use to count things: 0,1,2,... These are the finite cardinal numbers and are isomorphic to the natural numbers with zero.

    We should never omit zero when we are counting things.

    Of course they should not both be called the natural numbers. When beginning abstract math students run into a definition that is different from theirs they learn a valuable lesson: mathematicians can define a word to mean anything they want.

    Similar lessons: "pi" does not always refer to the real number by that name. It is used for "product" and for "projection", and other things. Mathematicians refer to "i" and engineers refer to "j" for the square root of -1.

    Charles Wells

    ReplyDelete
  2. Dan,
    I grew up with 1 as the first triangular number, and I can't, at the moment, see the reasoning for someone wanting to use zero; but it did make me wonder...
    The Greeks did not consider zero a number (maybe they didn't consider zero at all), nor even one. They considered one as the unity, and numbers were made up of multiples of a unit. ... even into the 16th century, Simon Stevin called for one to be included with the other integers as a number, because it was not generally accepted to be one.

    Euclid never mentions triangular numbers, but he defines square numbers as "A square number is equal multiplied by equal, or a number which is contained by two equal numbers" So one could not be (and zero even more so) a square number. The same restriction, I assume applied to triangular numbers. The idea of a figurate number assumes it makes the figure, and one doesn't actually make a triangle (except in the degenerate case).

    Nicomachus starts the triangular numbers with three (if I understand Heath's "History of Greek Mathematics"); but by the time of Thomas Harriot's 'Magisteria magna' . his list of numeri trianguli started at one.

    So I wonder, When did we decide to include one in the sequence of triangular numbers? and perhaps now, the question should be, who first decided to use 0 as a triangular number (or perhaps at this early date, we should wonder if there IS a good reason to consider zero as a triangular number)... and will we someday be discussing what does it mean if the zeroth triangular number is the same as the negative first triangular number(if indeed we still define them as n(n+1)/2.
    Guess I have to think on it some more...
    thanks for an entertaining post.

    ReplyDelete
  3. Consider the first differences in the sequence of triangular numbers (when not including zero).

    +2, +3, +4, +5, ...

    If 1 is indeed a triangular number (no argument there) How was the first triangle "created"? Elegance seems to suggest that before there was T_1 = 1, we must have done "+1" to get there. So T_0 = 0.

    If indeed we extend the first differences back (say we're "adding the integers") our sequence could extend in the other direction.

    ... 21, 15, 10, 6, 3, 1, 0, 0, 1, 3, 6, 10, 15, 21...

    (They don't go negative since we must say "what number yields 0 when we add -1?)

    ReplyDelete
  4. Thanks for the comments. I've been kicking myself for not giving the post the title "Much Ado about Nothing," but I'm glad that people are taking the opportunity to frame this more generally.

    I like the idea that "is zero a natural number?" could provide a teachable moment. Abandoning the idea that mathematical objects are somehow empirical and immutable in favor of seeing things in terms of how they are defined by mathematicians (and redefined) in different contexts is a big step.

    The historical context of a definition (for example, how triangular numbers predate the notion of zero) sometimes plays against other expectations for what the set should include. Since figurate numbers are generally discussed in a historical context, it makes a lot of sense to keep this perspective in mind.

    Context is everything. Certainly in the case where you want to sum the reciprocals of the triangulars (as Pat's recent post), we don't want to include the zero. :)

    I like the idea of ensuring that however you define the triangular numbers, their differences remain intact. However, I think extending them backwards to negative indicies runs into trouble if you try to ensure their sums yield the pyramidal numbers.

    Thanks again for all the great comments.

    -- Dan

    ReplyDelete
  5. I was just thinking a bit more about extending the triangulars (and pyramidals, etc.) to negative indexes, it works well in term of the formula $t_n^d= \frac{n(n+1)\ldots (n+d-1)}{d!}$, (where d=2 for the triangulars) and gives what Scott suggested. From what I understand, it was through investigating this sort of thing that Newton was lead to the generalized binomial theorem, so it is definitely worth looking at some more. Recreational math recapitulates serious math (with a lag of around 400 years). :)

    ReplyDelete