⚡ Build the skills to land top-paying quant jobs. Offer ends in 30d 01h 37m 51s30 days 1 hours 37 minutes 51 seconds.
Take a triangular array of dots with N rows: row 1 (the apex) has 1 dot, row 2 has 2 dots, …, row N has N dots.
The rows are staggered so that each dot touches up to six neighbours: two in its own row, two in the row above and two in the row below.
Call this board T_N. It has N(N+1)/2 dots.
A triad is a set of 3 dots in which each dot touches the other two, so it is the three corners of one small triangle of the grid.
A triad either points up (1 dot on top, 2 dots below it) or points down (2 dots on top, 1 dot below them).
T_N is tileable if all of its dots can be split into disjoint triads, so that every dot lies in exactly one triad.
Up and down triads may be mixed freely.
For example, T_2 is a single up triad, so it is tileable. T_3 is not tileable.
Tool (you may use this without proof). Suppose T_N is tileable. Then every tiling of T_N satisfies
(number of up triads) − (number of down triads) = ⌈N/3⌉,
where ⌈x⌉ means x rounded up to a whole number. (For example, the tiling of T_2 has 1 − 0 = 1 = ⌈2/3⌉.)
Note that the Tool only tells you something about boards that can be tiled.
To count a value of N, you must be sure that T_N really is tileable.
Question. Find the sum of all N with 1 ≤ N ≤ 50 for which T_N is tileable.
Answer format: a single integer.