A217541 Smallest numbers n such that s! + n^2 and (s+1)! + n^2 are squares for some s.
1, 108, 108, 1140, 288, 35280, 1068480, 88361280, 4409475840, 2094434496000, 868006971127296000
Offset: 1
Examples
4! + 1 = 5^2 and 5! + 1 = 11^2. 8! + 108^2 = 228^2 and 9! + 108^2 = 612^2. 9! + 108^2 = 612^2 and 10! + 108^2 = 1908^2. 10! + 1140^2 = 2220^2 and 11! + 1140^2 = 6420^2.
Programs
-
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)))))
Comments