OFFSET
1,2
COMMENTS
a(n) = number of all isosceles trapezoids in a triangular grid of side length n (or in a matchstick arrangement with enclosing triangle of length n), for n = 1, 2, 3, ...
Let b(n) = the number of all isosceles trapezoids with horizontal bases in a triangular grid of side length n, for n = 1, 2, 3, ... This is equal to the sum of trapezoids with a (horizontal) smaller base placed:
1) above the larger one. Their number is defined by the recurrence u(1) = 0, and u(n) = u(n-1) + binomial(n + 1, 3), for n > 1, which equals to the partial sums of the tetrahedral numbers (A000292). Its solution is u(n) = binomial(n + 2, 4), for n = 1, 2, 3, ..., which is A000332 (n + 2) = 0, 1, 5, 15, 35, 70, 126, 210, ...
2) below the larger one. Their number is defined by the recurrence d(n) = d(n - 1) + binomial(n - 1, 2) + binomial(n - 3, 2) + ... + binomial(n - 2*floor((n-1)/2) + 1, 2). The terms of this sequence are: d(1) = 0, d(2)= 0, and d(n)= A001752(n-3), for n > 2, which is 0, 0, 1, 4, 11, 24, 46, 80, 130, 200, ... The closed formula is d(n) = floor ((n^2 - 1)(n^2 - 3)/48).
Therefore b(n) = u(n) + d(n), where b(1) = 0 = A000332(3) + 0, b(2)= 1 = A000332 (4) + 0, and b(n) = A000332 (n+2) + A001752(n-3), for n > 2. Then b(n) = 0, 1, 6, 19, 46, 94, 172, 290, ..., for n = 1, 2, 3, ... So b(1) = 0, and b(n) = A070893(n - 1), for n > 1.
Therefore a(n) = 3*b(n) counts all isosceles trapezoids in a triangular grid of side length n, since for each of the three directions there are b(n) trapezoids with bases parallel to one of the three sides of the enclosing equilateral triangle.
LINKS
Valentin Bakoev, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (4,-5,0,5,-4,1).
FORMULA
a(n) = 3*(binomial(n + 2, 4) + floor((n^2 - 1)*(n^2 - 3)/48)) = floor((n^2 - 1)*(3*n^2 + 4*n - 3)/16).
a(1) = 0, and a(n) = 3*A070893(n - 1), for n > 1.
G.f.: 3*x^2*(1 + 2*x)/((1 - x)^5*(1 + x)). - Stefano Spezia, Oct 09 2025
EXAMPLE
The triangular grid of side length n=4 looks like this:
/\
/__\
/\ /\
/__\/__\
/\ /\ /\
/__\/__\/__\
/\ /\ /\ /\
/__\/__\/__\/__\
The number of isosceles trapezoids with horizontal bases, with the smaller base placed:
1) above the larger one, is: 6 + 3 + 1 = 10 trapezoids with height h; 3 + 1 = 4 trapezoids with height 2*h; 1 trapezoid with height 3*h. In total u(4) = 10 + 4 + 1 = 15 = A000332(n + 2) = A000332(6) trapezoids of this type;
MATHEMATICA
Table[Floor[((n^2 - 1) (3 n^2 + 4 n - 3))/16], {n, 1, 100}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Valentin Bakoev, Oct 01 2025
STATUS
approved
