This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A066857 #19 Jul 22 2025 05:53:20 %S A066857 0,1,2,8,20,44,140,320,476,3584,12311,4604,74879,414119,2071775, %T A066857 5703551,11551671,45680444,442548224,1960632176,2657058876, %U A066857 24923993276,130518272975,1478154932316,5446454455004,38610655379975 %N A066857 Smallest number k such that n! - k is a square. %C A066857 Sequence is not monotonic: a(n) < a(n-1) for n = 12, 71, 90, 143, 145, 151, 172, 218, 257. - _Zak Seidov_, Jun 25 2013 %H A066857 T. D. Noe, <a href="/A066857/b066857.txt">Table of n, a(n) for n = 1..100</a> %F A066857 a(n) = A053186(n!) = n!-A048760(n!) = n!-floor(sqrt(n!))^2 = n!-A055226(n)^2. %e A066857 a(10) = 3628800 - 1904 * 1904 = 3628800 - 3625216 = 3584. %t A066857 Table[n! - Floor[Sqrt[n! ]]^2, {n, 1, 27}] %o A066857 (PARI) a(n)=my(N=n!); N-sqrtint(N)^2 \\ _Charles R Greathouse IV_, Jun 25 2013 %Y A066857 Cf. A068869. %K A066857 nonn %O A066857 1,3 %A A066857 _Reinhard Zumkeller_, Jan 21 2002 %E A066857 More terms from _Vladeta Jovovic_, Mar 21 2002 %E A066857 Edited by _Robert G. Wilson v_ and _N. J. A. Sloane_, Mar 22 2002