login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A068869 Smallest number k such that n! + k is a square. 13

%I #46 Feb 17 2023 16:49:01

%S 0,2,3,1,1,9,1,81,729,225,324,39169,82944,176400,215296,3444736,

%T 26167684,114349225,255004929,1158920361,11638526761,42128246889,

%U 191052974116,97216010329,2430400258225,1553580508516,4666092737476,565986718738441,2137864362693921

%N Smallest number k such that n! + k is a square.

%C Observation: for n < 2000, only for n = 1, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16 is a(n) a square (see A360210).

%C According to my conjecture that n! + n^2 != m^2 for n >= 1, m >= 0 (see A004664), for all terms: a(n) != n^2. - _Alexander R. Povolotsky_, Oct 06 2008

%C There are two cases: a(n) > sqrt(n!) in A182203 and a(n) < sqrt(n!) in A182204. - _Artur Jasinski_, Apr 13 2012

%H T. D. Noe, <a href="/A068869/b068869.txt">Table of n, a(n) for n=1..100</a>

%F a(n) = A055228(n)^2 - n! = ceiling(sqrt(n!))^2 - n! = A048761(n!) - n!.

%F a(n) <= A038202(n)^2, with equality for the n listed in the first comment. - _M. F. Hasler_, Apr 01 2012

%e a(6) = 9 as 6! + 9 = 729 is a square.

%t Table[ Ceiling[ Sqrt[n! ]]^2 - n!, {n, 1, 28}]

%o (PARI) A068869(n)=(sqrtint(n!-1)+1)^2-n! \\ _M. F. Hasler_, Apr 01 2012

%o (Python)

%o from math import factorial, isqrt

%o def a(n): return (isqrt((f:=factorial(n))-1)+1)**2 - f

%o print([a(n) for n in range(1, 30)]) # _Michael S. Branicky_, Jan 30 2023

%Y Cf. A038202, A048761, A055228, A066857, A360210.

%Y Cf. A182203, A182204.

%K nonn

%O 1,2

%A _Amarnath Murthy_, Mar 13 2002

%E More terms from _Vladeta Jovovic_, Mar 21 2002

%E Edited by _Robert G. Wilson v_ and _N. J. A. Sloane_, Mar 22 2002

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 02:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)