The right end here 1,4,9,16,etc is the perfect squares. The vertical 2,6,12,20,etc at x=-1 is the pronic numbers s*(s+1), half way between those successive squares.
The step 2 is the same as the PyramidSides, Corner and SacksSpiral paths. For the SacksSpiral, spiral arms going to the right correspond to diagonals in the pyramid, and arms to the left correspond to verticals.
Or step 1 goes solely to the right. This is equivalent to the Diagonals path, but columns shifted up to make horizontal rows.
Step 0 means simply a vertical, each row 1 wide and not increasing. This is unlikely to be much use. The Rows path with width 1 does this too.
Various number sequences fall in regular patterns positions depending on the step. Large steps are not particularly interesting and quickly become very wide. A limit might be desirable in a user interface, but there's no limit in the code as such.
The second pentagonals are not prime beyond 7 since they're (3k+1)*k/2 with the denominator 2 dividing into one or the other part. Numbers S(k)-1 immediately to the left are never prime either since S(k)-1 = (3*k-2)(k+1)/2. Likewise S(k)-2 = (3*k+4)(k-1)/2 beyond 13. If you plot the primes on a step 3 PyramidRows then these sequences make a 3-wide vertical gap at x=-1,-2,-3 where there's no primes.
In general a constant offset c from S(k) is a column and the simple factorization above using the roots of the quadratic S(k)-c = (3/2)*k^2 + (1/2)*k - c is possible whenever 24*c+1 is a perfect square. This means the further columns S(k)-5, S(k)-7, S(k)-12, etc have no primes either. The S(k), S(k)-1, S(k)-2 ones are prominent because they're adjacent. There's no other adjacent columns of this type because the squares become too far apart for successive 24*c+1. Of course there could be lots of other reasons for other columns to have many or few primes or above a certain point, etc.
Create and return a new path object. The default step is 2.
For $n < 0 the return is an empty list, it being considered there are no negative points in the pyramid.
Return the point number for coordinates $x,$y. $x and $y are each rounded to the nearest integer, which has the effect of treating each point in the pyramid as a square of side 1. If $x,$y is outside the pyramid the return is undef.