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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

0, 2, 3, 1, 1, 9, 1, 81, 729, 225, 324, 39169, 82944, 176400, 215296, 3444736, 26167684, 114349225, 255004929, 1158920361, 11638526761, 42128246889, 191052974116, 97216010329, 2430400258225, 1553580508516, 4666092737476, 565986718738441, 2137864362693921
Offset: 1

Views

Author

Amarnath Murthy, Mar 13 2002

Keywords

Comments

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).
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
There are two cases: a(n) > sqrt(n!) in A182203 and a(n) < sqrt(n!) in A182204. - Artur Jasinski, Apr 13 2012

Examples

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

Crossrefs

Programs

  • Mathematica
    Table[ Ceiling[ Sqrt[n! ]]^2 - n!, {n, 1, 28}]
  • PARI
    A068869(n)=(sqrtint(n!-1)+1)^2-n!  \\ M. F. Hasler, Apr 01 2012
    
  • Python
    from math import factorial, isqrt
    def a(n): return (isqrt((f:=factorial(n))-1)+1)**2 - f
    print([a(n) for n in range(1, 30)]) # Michael S. Branicky, Jan 30 2023

Formula

a(n) = A055228(n)^2 - n! = ceiling(sqrt(n!))^2 - n! = A048761(n!) - n!.
a(n) <= A038202(n)^2, with equality for the n listed in the first comment. - M. F. Hasler, Apr 01 2012

Extensions

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

A227546 a(n) = n! + n^2 + 1.

Original entry on oeis.org

2, 3, 7, 16, 41, 146, 757, 5090, 40385, 362962, 3628901, 39916922, 479001745, 6227020970, 87178291397, 1307674368226, 20922789888257, 355687428096290, 6402373705728325, 121645100408832362, 2432902008176640401, 51090942171709440442, 1124000727777607680485
Offset: 0

Views

Author

Vincenzo Librandi, Jul 26 2013

Keywords

Crossrefs

Cf. A119662 (primes of the form k! + k^2 + 1).

Programs

  • Magma
    [Factorial(n)+n^2+1: n in [0..25]];
    
  • Mathematica
    Table[n! + n^2 + 1, {n, 0, 30}]
  • Maxima
    /* By the recurrence: */ a[0]:2$ a[1]:3$ a[n]:=(n^4-5*n^3+8*n^2-5*n-1)*a[n-1]/(n^3-6*n^2+11*n -7)-(n-1)*(n^3-3*n^2+2*n-1)*a[n-2]/(n^3-6*n^2+11*n-7)$ makelist(a[n], n, 0, 21); /* Bruno Berselli, Jul 26 2013 */

Formula

(n^3 -6*n^2 +11*n -7)*a(n) -(n^4 -5*n^3 +8*n^2 -5*n -1)*a(n-1) +(n-1)*(n^3 -3*n^2 +2*n -1)*a(n-2) = 0 for n>1. - Bruno Berselli, Jul 26 2013

A119662 Primes of the form k! + k^2 + 1.

Original entry on oeis.org

2, 3, 7, 41, 757
Offset: 1

Views

Author

Jonathan Vos Post, Jul 28 2006

Keywords

Comments

Primes of the form A004664(k) + 1.
For k! + k^2 + 1 to be prime, k > 1, it is necessary but not sufficient for k to be even.
No more terms for k < 1150. [Vincenzo Librandi, Dec 22 2010]

Crossrefs

Programs

Formula

A000040 INTERSECTION A227546 = primes INTERSECTION {k! + k^2 + 1}.
Showing 1-3 of 3 results.