> To me it seems math people usually exclude zero

nope.

Math people changed their mind, but for historical reasons there is some confusion.¹

Natural numbers are defined by successively adding 1 and zero is the neutral element of addition.

It's much easier to operate on sets with neutral element included!

Most integer operations (at least in Perl) can return 0.

Thats the meta-argument why Moritz's answer makes perfect sense. This way combinations of integer functions always include another neutral element as possible result.

For instance otherwise adding the sum of the first index of two arrays would be 2 (the second element) instead of 0 (again the first)

Cheers Rolf

( addicted to the Perl Programming Language)

1) the concept of natural numbers was older than group theory


In reply to Re^6: why the array index has to start at 0?? by LanX
in thread why the array index has to start at 0?? by targetsmart

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.