The base case of the definition.
A recursive definition (or a recursive algorithm) needs two parts:
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 no!
This definition uses Triangle(N)
without saying anything
about it. Is this wrong?