# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a308064 Showing 1-1 of 1 %I A308064 #11 May 12 2020 21:51:45 %S A308064 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 A308064 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 A308064 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 A308064 Number of triangles with perimeter n whose side lengths are square numbers. %H A308064 Robert Israel, Table of n, a(n) for n = 1..10000 %F A308064 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 A308064 N:= 100: %p A308064 V:= Vector(N): %p A308064 for a from 1 to floor(sqrt(N/3)) do %p A308064 for b from a to floor(sqrt((N-a^2)/2)) do %p A308064 R:= map(c -> a^2 + b^2 + c^2, [$b .. floor(sqrt(min(a^2+b^2-1, N-a^2-b^2)))]); %p A308064 V[R]:= map(`+`,V[R], 1); %p A308064 od od: %p A308064 convert(V,list); # _Robert Israel_, Jan 01 2020 %t A308064 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 A308064 Cf. A010052. %K A308064 nonn %O A308064 1,99 %A A308064 _Wesley Ivan Hurt_, May 10 2019 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE