cp's OEIS Frontend

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.

A066857 Smallest number k such that n! - k is a square.

Original entry on oeis.org

0, 1, 2, 8, 20, 44, 140, 320, 476, 3584, 12311, 4604, 74879, 414119, 2071775, 5703551, 11551671, 45680444, 442548224, 1960632176, 2657058876, 24923993276, 130518272975, 1478154932316, 5446454455004, 38610655379975
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 21 2002

Keywords

Comments

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

Examples

			a(10) = 3628800 - 1904 * 1904 = 3628800 - 3625216 = 3584.
		

Crossrefs

Cf. A068869.

Programs

  • Mathematica
    Table[n! - Floor[Sqrt[n! ]]^2, {n, 1, 27}]
  • PARI
    a(n)=my(N=n!); N-sqrtint(N)^2 \\ Charles R Greathouse IV, Jun 25 2013

Formula

a(n) = A053186(n!) = n!-A048760(n!) = n!-floor(sqrt(n!))^2 = n!-A055226(n)^2.

Extensions

More terms from Vladeta Jovovic, Mar 21 2002
Edited by Robert G. Wilson v and N. J. A. Sloane, Mar 22 2002