%I #11 Jan 29 2020 04:57:07
%S 1,2,5,10,14,17,26,29,37,50,62,65,74,77,82,98,101,109,110,122,125,145,
%T 149,170,173,190,194,197,209,226,242,245,257,269,290,302,305,314,325,
%U 334,362,365,398,401,410,434,437,442,469,482,485,497,509,514,530,554,557
%N Positive integers k such that k = (a^2 + b^2 + c^2)/(a*b + b*c + c*a) for some integers a, b and c.
%C This sequence is infinite because k = x^2 + 1 is a term, where a = x + 1, b = x^2 + 1 and c = x^4 + x^3 + 3*x^2 + 2*x + 1. There are other forms of k:
%C k = (a^2-a+2)^2 - 2 when a + b = 1 and c = a^2 - a + 1.
%C k = x^4 + 2*x^3 + 5*x^2 + 4*x + 2 when a = k*(b+c) + x, b = x^2 + x + 1 and c = x + 1.
%C k = ((a^2+a*b+b^2)^2 - 2*a*b + 1)/(a + b)^2 when a = Fibonacci(2*m-1), b = Fibonacci(2*m) and c = ((a^2+a*b+b^2)^2 - a*b)/(a + b).
%C a(n) == 1 or 2 (mod 4). Proof: a^2 - k*(b+c)*a + (b^2+c^2-k*b*c) = 0, hence discriminant D = (k^2-4)*(b^2+c^2) + (2*k^2+4*k)*b*c is a square. Because (a/g, b/g, c/g) is also a set of solution if k = (a^2 + b^2 + c^2)/(a*b + b*c + c*a) and gcd(a, b, c) = g, we only need to consider the case of gcd(a,b,c) = 1.
%C Case (i). k = 4*r, then D/4 = (4*r^2-1)*(b^2+c^2) + (8*r^2+4*r)*b*c == 2 or 3 (mod 4), hence D is not a square, a contradiction.
%C Case (ii). k = 4*r - 1, then (a+b)^2 + (b+c)^2 + (c+a)^2 = 8*r*(a*b + b*c + c*a) is divisible by 4, hence a, b and c are odd numbers. Therefore, ((a+b)^2 + (b+c)^2 + (c+a)^2)/4 == 1 (mod 2), a contradiction.
%H Jinyuan Wang, <a href="/A331605/a331605.txt">PARI program and details with k less than 100</a>
%e a(4) = 10 because 10 = ((-1)^2 + 2^2 + 5^2)/((-1)*2 + 2*5 + 5*(-1)).
%K nonn
%O 1,2
%A _Jinyuan Wang_, Jan 22 2020
%E a(22)-a(57) from _Giovanni Resta_, Jan 29 2020
|