Consider an equilateral triangular grid of dots with N rows, such as the one presented here (with N = 22). A “triad” is a set of 3 dots where each dot in the triad borders the other two. The top two rows the triangular grid form a triad; all triads are (rotations of) precisely this shape.
For some values of N, it is possible to separate the triangular grid into disjoint triads such that every dot is a part of one triad. For example, it is obviously possible when N=2, but not when N=3 or N=4.
What is the sum of all values of N < 40 for which it is possible?
Please note that only initial submissions will qualify.
Thank you for submitting your answer to the current puzzle.
Please check back before the end of the month to to see if you've correctly solved this month's puzzle.