login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

Table of n, a(n) for n=0..29.

FORMULA

a(n) = abs(n!-A260373(n)).

EXAMPLE

6!=720. The nearest perfect square is 729. The difference between these is 9, so a(6)=9.

PROG

(PARI) a(n)=abs(n!-round(sqrt(n!))^2) \\ Charles R Greathouse IV, Jul 23 2015

(Python)

from gmpy2 import isqrt

A260374_list, g = [0], 1

for i in range(1, 1001):

....g *= i

....s = isqrt(g)

....t = g-s**2

....A260374_list.append(int(t if t-s <= 0 else 2*s+1-t)) # Chai Wah Wu, Jul 23 2015

CROSSREFS

Cf. A260373, A260375.

Sequence in context: A165889 A087127 A144946 * A157109 A185814 A174553

Adjacent sequences:  A260371 A260372 A260373 * A260375 A260376 A260377

KEYWORD

nonn

AUTHOR

Otis Tweneboah, Pratik Koirala, Eugene Fiorini, Nathan Fox, Jul 23 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 11 21:00 EST 2019. Contains 329937 sequences. (Running on oeis4.)