login
Smallest numbers n, for a given s, such that s! + n^2 and (s+3)! + n^2 are squares.
3

%I #16 Oct 12 2012 13:51:31

%S 1,828,508,239499435,4693095288000,561589459200,148245349824000

%N Smallest numbers n, for a given s, such that s! + n^2 and (s+3)! + n^2 are squares.

%C The corresponding values of s are: 4, 8, 9, 15, 21, 24, 27.

%e 4! + 1 = 5^2 and 7! + 1 = 71^2.

%e 8! + 828^2 = 852^2 and 11! + 828^2 = 6372^2.

%o (PARI) for(n=4,30,a=n!;b=((n+3)*(n+2)*(n+1)-1)*a;c=divisors(b);for(i=2,#c-1,s=c[i];r=b\s;if(r<s,next(2),d=abs(s-r)/2;t=d^2-a;if(issquare(t),print([n,d,sqrtint(t)])))))

%Y Cf. A217277, A217541, A217550, A217551, A217553.

%K nonn

%O 1,2

%A _Robin Garcia_, Oct 06 2012