Triangle count in isometric grid

Find  the number of equilateral triangles with vertices in an equilateral triangular array of points with n rows (offset 1), with any orientation.[br][br]See also [url=https://oeis.org/A000332/a000332.pdf]Original solution[/url] by Ignacio Larrosa Cañestro and [url=https://oeis.org/A000332]OEIS A000332[/url][br][br]Based on [url=https://twitter.com/ilarrosac/status/1089123301522370561]https://twitter.com/ilarrosac/status/1089123301522370561[/url]

Information: Triangle count in isometric grid