Barycentric coordinates describe points rather than triangles. So let's identify each triangle by its "top centre" point. That's its top vertex for an upward-pointing triangle, and the centre of its top edge for a downward-pointing one.
Number the rows of triangles from 0. If the big triangle has $n$ little triangles on each side, then row $k$ contains the triangles whose reference points have barycentric coords $(n-k,b,c)$ for some $b,c$. And it begins with triangle number $k^2$.
Then the reference points are spaced evenly with distance 1/2 along each row.
Therefore, the triangle whose reference point has barycentric coords $(a,b,c)$ is in row $n-a$ which begins with triangle $(n-a)^2$; within that row it's in (0-based) position $2c$; so its index number is $(n-a)^2+2c$.
Let's sanity-check this by looking at the first triangle whose number isn't given in the diagram above. Its reference point is at (6,3/2,1/2) and $n=8$ so its index should be $(8-6)^2+2\cdot\frac12=5$, which is correct. Looks like it works!