|
|
A260374
|
|
The distance between n! and the nearest perfect square.
|
|
2
|
|
|
0, 0, 1, 2, 1, 1, 9, 1, 81, 476, 225, 324, 4604, 74879, 176400, 215296, 3444736, 11551671, 45680444, 255004929, 1158920361, 2657058876, 24923993276, 130518272975, 97216010329, 2430400258225, 1553580508516, 4666092737476, 538347188396016, 2137864362693921
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
6!=720. The nearest perfect square is 729. The difference between these is 9, so a(6)=9.
|
|
PROG
|
(Python)
from gmpy2 import isqrt
for i in range(1, 1001):
....g *= i
....s = isqrt(g)
....t = g-s**2
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|