login
A066857
Smallest number k such that n! - k is a square
5
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,3
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
FORMULA
a(n) = A053186(n!) = n!-A048760(n!) = n!-floor(sqrt(n!))^2 = n!-A055226(n)^2.
EXAMPLE
a(10) = 3628800 - 1904 * 1904 = 3628800 - 3625216 = 3584.
MATHEMATICA
Table[n! - Floor[Sqrt[n! ]]^2, {n, 1, 27}]
PROG
(PARI) a(n)=my(N=n!); N-sqrtint(N)^2 \\ Charles R Greathouse IV, Jun 25 2013
CROSSREFS
Cf. A068869.
Sequence in context: A296954 A203604 A240940 * A146168 A058405 A133326
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 21 2002
EXTENSIONS
More terms from Vladeta Jovovic, Mar 21 2002
Edited by Robert G. Wilson v and N. J. A. Sloane, Mar 22 2002
STATUS
approved