%I #22 Apr 04 2016 16:24:16
%S 1,108,108,1140,288,35280,1068480,88361280,4409475840,2094434496000,
%T 868006971127296000
%N Smallest numbers n such that s! + n^2 and (s+1)! + n^2 are squares for some s.
%C The values of s are: 4, 8, 9, 10, 12, 14, 16, 18, 22, 24, 32.
%C It can be seen that n is, on average, an increasing function. (It is constant at s = 8 and s = 9 and decreases at s = 12). If proved this would show there is no repetition of a value of n for which simultaneously s! + n^2 = b^2 and (s+k)! + n^2 = c^2 for general and large values of k (not only for k = 1) and would solve BrocardĀ“s Problem: Exactly, the only 3 solutions to s! + 1 = b^2 are (4,5); (5,11) and (7,71).
%C Note that n^2 was chosen a square, but this is not necessary.
%C More terms of the sequence are hard to get if the program based on a simple algorithm, needing 10^9 bytes memory, is not improved in the sense of reducing the number of divisors used. This could probably be done.
%e 4! + 1 = 5^2 and 5! +1 = 11^2.
%e 8! + 108^2 = 228^2 and 9! + 108^2 = 612^2.
%e 9! + 108^2 = 612^2 and 10! + 108^2 = 1908^2.
%e 10! + 1140^2 = 2220^2 and 11! + 1140^2 = 6420^2.
%o (PARI) for(n=4,34,a=n!;b=n*a;s=sqrtint(a)+1+sqrtint((n+1)*a)+1;c=divisors(b);for(i=2,#c-1,if(s<=c[i],s=c[i];r=b\s;if(r%2==1,s=c[i+1]);r=b/s;d=(s-r)/2;t=d^2-a;if(issquare(t),print1(sqrtint(t),", ");next(2)))))
%Y Cf. A217277, A217541, A217550, A217551, A217553.
%K nonn
%O 1,2
%A _Robin Garcia_, Oct 06 2012