OFFSET
0,8
FORMULA
a(n) = Sum_{k=1..floor(n/4)} Sum_{j=k..floor((n-k)/3)} Sum_{i=j..floor((n-j-k)/2)} (2 - [k = j])*(-1 + sign(ceiling((k+j)/sqrt((n-i-j-k)^2 + i^2)))), where [ ] is the Iverson bracket.
EXAMPLE
The notation [q,r,s,t] below shows the order in which the sides are joined (counterclockwise) starting with the largest side q, the second largest side r, and then each of the possible orders in which s and t can occur.
a(4) = 1; [1,1,1,1] a square.
a(5) = 0; ( not [2,1,1,1] since sqrt(2^2+1^2) = sqrt(5) > 1+1 = 2. )
a(7) = 2; [2,2,2,1], [2,2,1,2].
a(14) = 4; [5,3,3,3], [4,4,4,2], [4,4,3,3], and [4,4,2,4].
MATHEMATICA
Table[Sum[Sum[Sum[(2 - KroneckerDelta[k, j]) Sign[Ceiling[(j + k)/Sqrt[(n - i - j - k)^2 + i^2]] - 1], {i, j, Floor[(n - j - k)/2]}], {j, k, Floor[(n - k)/3]}], {k, Floor[n/4]}], {n, 0, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Jan 09 2021
STATUS
approved