%I #14 Oct 16 2019 03:28:15
%S 5,11,71,419,4159
%N Numbers k such that y!/x! + 1 = k^2 has a nonnegative integer solution with y - x <> 1 or 4.
%C y-x = 1 is not included because (x+1)!/x! + 1 = x+2.
%C y-x = 4 is not included because (x+4)!/x! + 1 = (x^2+5*x+5)^2 = A028387(x+1)^2 + 1.
%C y-x = 2 is easily seen not to be possible.
%C y-x = 3 corresponds to the elliptic curve (x + 1)*(x + 2)*(x + 3) + 1 = k^2.
%C According to Sage, the only integral points on that curve are (x,k) = (-3,+-1),(-2,+-1),(-1,+-1),(1,+-5),(3,+-11),(54,+-419).
%C Brocard's problem is the case x=1.
%C If a(6) exists, it is greater than 10^16.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Brocard%27s_problem">Brocard's problem</a>
%H MathOverflow, <a href="https://mathoverflow.net/questions/343631/on-a-variant-of-brocards-problem-using-the-definition-of-pochhammer-symbols/343633">On a variant of Brocard's problem using the definition of Pochhammer symbols</a>
%e 4!/1! + 1 = 5^2.
%e 6!/3! + 1 = 11^2.
%e 7!/1! + 1 = 71^2.
%e 57!/54! + 1 = 419^2.
%e 14!/7! + 1 = 4159^2.
%p N:= 10^15: # to get all terms <= N
%p L:= N^2-1:
%p Res:= {5,11,419}:
%p for x from 1 do
%p t:= (x+1)*(x+2)*(x+3)*(x+4)*(x+5);
%p if t > L then break fi;
%p if issqr(t+1) then
%p Res:= Res union {sqrt(t+1)};
%p fi;
%p for y from x+6 do
%p t:= t*y;
%p if t > L then break fi;
%p if issqr(t+1) then
%p Res:= Res union {sqrt(t+1)};
%p fi;
%p od;
%p od:
%p sort(convert(Res,list));
%Y Cf. A028387.
%K nonn,more
%O 1,1
%A _Robert Israel_, Oct 15 2019