%I #11 May 12 2020 21:51:45
%S 0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,1,1,
%T 0,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,0,0,0,0,1,0,0,
%U 0,0,0,0,1,0,1,1,1,0,0,0,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,1,0,2,0
%N Number of triangles with perimeter n whose side lengths are square numbers.
%H Robert Israel, <a href="/A308064/b308064.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1))) * c(i) * c(k) * c(n-i-k), where c(n) is the characteristic function of squares (A010052).
%p N:= 100:
%p V:= Vector(N):
%p for a from 1 to floor(sqrt(N/3)) do
%p for b from a to floor(sqrt((N-a^2)/2)) do
%p R:= map(c -> a^2 + b^2 + c^2, [$b .. floor(sqrt(min(a^2+b^2-1, N-a^2-b^2)))]);
%p V[R]:= map(`+`,V[R], 1);
%p od od:
%p convert(V,list); # _Robert Israel_, Jan 01 2020
%t Table[Sum[Sum[(Floor[Sqrt[i]] - Floor[Sqrt[i - 1]]) (Floor[Sqrt[k]] - Floor[Sqrt[k - 1]]) (Floor[Sqrt[n - k - i]] - Floor[Sqrt[n - k - i - 1]])*Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]
%Y Cf. A010052.
%K nonn
%O 1,99
%A _Wesley Ivan Hurt_, May 10 2019
|