%I #15 Jun 22 2019 10:09:48
%S 2,2,3,3,3,3,3,4,5,2,3,6,3,2,4,6,3,4,4,5,4,2,4,6,4,3,6,4,3,5,3,6,6,2,
%T 3,9,4,2,4,6,3,4,3,5,7,3,4,8,4,3,7,4,3,6,3,6,4,4,4,6,4,2,7,8,4,3,3,6,
%U 4,3,4,14,4,2,6,4,3,3,4,7,8,4,3,7,4,3,5
%N Number of integer solutions to n = f(x,y,z) = x*(x-y)*(x-z) + y*(y-z)*(y-x) + z*(z-x)*(z-y) with 0 <= x <= y <= z.
%C In Bullen (1998) page 229, the r=1 case of Schur's inequality implies that f(x, y, z) is positive if x, y, z are positive.
%C n = f(n-1, n-1, n) = f(n, n+1, n+1) so a(n) >= 2 for all n > 0.
%C 0 = f(x, x, x) so there are an infinite number of solutions for n=0.
%C Except for (x, y, z) = (n, n+1, n+1) all other solutions have z <= n.
%C f(x, y, z) = x * y * z - (x + y - z) * (y + z - x) * (z + x - y). See Bullen (1998) page 17 Padoa's inequality.
%D P. S. Bullen, A dictionary of inequalities, Addison Wesley Longman Limited, 1998.
%H Alois P. Heinz, <a href="/A227002/b227002.txt">Table of n, a(n) for n = 1..200</a>
%o (PARI) {a(n) = if( n<1, 0, 1 + sum( z=0, n, sum( y=0, z, sum( x=0, y, n == x*(x - y)*(x - z) + y*(y - z)*(y - x) + z*(z - x)*(z - y)))))}
%K nonn
%O 1,1
%A _Michael Somos_, Jun 26 2013