A good answer might be:

The base case of the definition.

Base Case of the Pyramid

A recursive definition (or a recursive algorithm) needs two parts:

  1. If the problem is easy, solve it immediately.
  2. If the problem can't be solved immediately, divide it into smaller problems, then:
    • Solve the smaller problems by applying this procedure to each of them.

In terms of pyramidal numbers, this is:

Pyramid(1) = 1
Pyramid(N) = Pyramid(N-1) + Triangle(N)

Oddly, the base case for pyramidal numbers is the peak of the pyramid.


Oh, oh... this definition uses Triangle(N) without saying anything about it. Is this wrong?