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-10 of 12 results. Next

A182203 Numbers n for which A068869(n) > sqrt(n!).

Original entry on oeis.org

2, 3, 9, 12, 13, 17, 18, 21, 22, 23, 28, 31, 32, 34, 35, 36, 38, 39, 40, 41, 44, 48, 49, 51, 52, 56, 57, 58, 63, 65, 67, 68, 69, 71, 72, 73, 75, 77, 78, 79, 80, 81, 82, 85, 86, 87, 88, 90, 91, 92, 93, 97, 99, 100
Offset: 1

Views

Author

Artur Jasinski, Apr 17 2012

Keywords

Comments

There are two cases: A068869(n) > sqrt(n!) in this sequence and A068869(n) < sqrt(n!) in A182204.

Crossrefs

Programs

  • Mathematica
    aa = {}; Do[k = Ceiling[Sqrt[n!]]^2 - n!; If[k > Sqrt[n!], AppendTo[aa, n]], {n, 1, 100}]; aa

A182204 Numbers n for which A068869(n) < sqrt(n!).

Original entry on oeis.org

1, 4, 5, 6, 7, 8, 10, 11, 14, 15, 16, 19, 20, 24, 25, 26, 27, 29, 30, 33, 37, 42, 43, 45, 46, 47, 50, 53, 54, 55, 59, 60, 61, 62, 64, 66, 70, 74, 76, 83, 84, 89, 94, 95, 96, 98, 102, 103, 104, 107, 109, 111, 113, 114, 117, 118, 122, 123, 125, 127, 128, 129
Offset: 1

Views

Author

Artur Jasinski, Apr 17 2012

Keywords

Comments

There are two cases: A068869(n) > sqrt(n!) see A182203 and A068869(n) < sqrt(n!) this sequence.

Crossrefs

Programs

  • Mathematica
    aa = {}; Do[k = Ceiling[Sqrt[n!]]^2 - n!;
      If[k < Sqrt[n!], AppendTo[aa, n]], {n, 1, 118}]; aa

A360210 Indices of squares in A068869.

Original entry on oeis.org

1, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16
Offset: 1

Views

Author

Keywords

Comments

a(14) > 30000. - Michel Marcus, Jan 30 2023

Examples

			5 is a term because A068869(5) = 1 is a square;
8 is a term because A068869(8) = 81 is a square.
		

Crossrefs

Cf. A068869.

Programs

  • PARI
    isok(n) = issquare((sqrtint(n!-1)+1)^2-n!); \\ Michel Marcus, Jan 30 2023

A182278 Indices n such that A068869(n)<A068869(n-1).

Original entry on oeis.org

4, 7, 10, 24, 26, 42, 117, 135, 141, 150, 194, 220, 224, 236, 312, 336, 399, 406, 438, 497, 529, 652, 663, 707, 797, 844, 879, 908, 988, 1092, 1099, 1133, 1141, 1300, 1304, 1371, 1397, 1494, 1513, 1536, 1676, 1886, 1970, 1981, 1988, 2076, 2093, 2221, 2270, 2356, 2390, 2462
Offset: 1

Views

Author

M. F. Hasler and Artur Jasinski, Apr 23 2012

Keywords

Comments

The sequence A068869 is statistically growing, but I conjecture that there are infinitely many indices n such that A068869(n)<A068869(n-1). However, we don't yet know whether there are two consecutive integers in the sequence, i.e., a term n such that, additionally to the above, A068869(n+1)<A068869(n).
a(n) roughly grows like n^2.

Programs

  • Mathematica
    w = 0; aa = {}; Do[k = Ceiling[Sqrt[n!]]^2 - n!;
    If[k < w, AppendTo[aa, n - 1]]; w = k, {n, 1, 2500}]; aa
  • PARI
    for(i=1,2500,A068869(i)<A068869(i-1)&print1(i","))

A068527 Difference between smallest square >= n and n.

Original entry on oeis.org

0, 0, 2, 1, 0, 4, 3, 2, 1, 0, 6, 5, 4, 3, 2, 1, 0, 8, 7, 6, 5, 4, 3, 2, 1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9
Offset: 0

Views

Author

Vladeta Jovovic, Mar 21 2002

Keywords

Comments

The greedy inverse (sequence of the smallest k such that a(k)=n) starts 0, 3, 2, 6, 5, 11, 10, 18, 17, 27, 26, 38, 37, 51, 50, ... and appears to be given by A010000 and A002522, interleaved. - R. J. Mathar, Nov 17 2014

Crossrefs

Bisections: A348596, A350962.

Programs

Formula

a(n) = A048761(n) - n = ceiling(sqrt(n))^2 - n.
G.f.: (-x^2 + (x-x^2)*Sum_{m>=1} (1+2*m)*x^(m^2))/(1-x)^2. This sum is related to Jacobi Theta functions. - Robert Israel, Nov 17 2014

A038202 Least k such that n! + k^2 is a square.

Original entry on oeis.org

1, 1, 3, 1, 9, 27, 15, 18, 288, 288, 420, 464, 1856, 10080, 46848, 210240, 400320, 652848, 3991680, 27528402, 32659200, 163296000, 1143463200, 1305467240, 6840489600, 9453465438, 337082683248, 163425485250, 8376514506360, 8440230839040, 5088099594240
Offset: 4

Views

Author

Keywords

Comments

Let f = n!/4 and let x be the largest divisor of f such that x < sqrt(f). Then a(n) = f/x - x. The greatest k such that n! + k^2 is a square is f-1. The number of k for which n! + k^2 is a square is A038548(n). - T. D. Noe, Nov 02 2004
For greatest k such that n! + k^2 is a square see A181892; for numbers x such that n! + k^2 = x^2 see A181896. - Artur Jasinski, Mar 31 2012

Crossrefs

Cf. A038548 (number of divisors of n that are at most sqrt(n)), A068869.

Programs

  • Mathematica
    Table[f=n!/4; x=Max[Select[Divisors[f], #<=Sqrt[f]&]]; f/x-x, {n, 4, 20}] (* T. D. Noe, Nov 02 2004 *)
  • PARI
    a(n) = my(k=0); while(!issquare(n!+k^2), k++); k; \\ Michel Marcus, Sep 16 2018

Extensions

a(30)-a(34) from Jon E. Schoenfield, Sep 15 2018

A066857 Smallest number k such that n! - k is a square.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jan 21 2002

Keywords

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

Examples

			a(10) = 3628800 - 1904 * 1904 = 3628800 - 3625216 = 3584.
		

Crossrefs

Cf. A068869.

Programs

  • Mathematica
    Table[n! - Floor[Sqrt[n! ]]^2, {n, 1, 27}]
  • PARI
    a(n)=my(N=n!); N-sqrtint(N)^2 \\ Charles R Greathouse IV, Jun 25 2013

Formula

a(n) = A053186(n!) = n!-A048760(n!) = n!-floor(sqrt(n!))^2 = n!-A055226(n)^2.

Extensions

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

A240937 Least number k >= 0 such that n! + k is a cube.

Original entry on oeis.org

0, 6, 2, 3, 5, 9, 792, 2555, 10368, 23464, 84888, 1047087, 2483200, 54721675, 228537856, 1394007616, 5090444477, 51286309703, 608427634303, 3260058995493, 11314112766137, 51848285189219, 1034026438223449, 11075640379838488, 181108172062981288, 1566869630866485093
Offset: 1

Views

Author

Derek Orr, Aug 03 2014

Keywords

Crossrefs

Cf. A068869.

Programs

  • Maple
    f:= proc(n) local N; N:= n!; ceil(N^(1/3))^3 - N end proc:
    seq(f(n), n=1..30); # Robert Israel, Aug 04 2014
  • Mathematica
    f[n_] := Block[{c = n! - 1}, (1 + Floor[c^(1/3)])^3 - c - 1]; Array[f, 26] (* Robert G. Wilson v, Aug 04 2014 *)
    Table[Ceiling[CubeRoot[n!]]^3-n!,{n,30}] (* Harvey P. Dale, Jun 21 2025 *)
  • PARI
    a(n)=for(k=0,10^10,s=n!+k;if((ispower(s)&&ispower(s)%3==0)||s==1,return(k)))
    n=1;while(n<20,print1(a(n),", ");n++)
    
  • PARI
    vector(50, n, ceil(n!^(1/3))^3-n!) \\ faster program

Extensions

a(15) onward from Robert G. Wilson v, Aug 04 2014

A083397 Largest prime factor of n! + k where k is the least positive integer such that n! + k is a square.

Original entry on oeis.org

0, 2, 3, 5, 11, 3, 71, 67, 67, 127, 13, 509, 137, 37, 71471, 71471, 409993, 941351, 24419, 287093, 7147792819, 110647261, 80392811773, 4716679469, 4716679469, 323905128133, 8392290961, 551615338229, 34178276390953, 73669621631
Offset: 1

Views

Author

Jason Earls, Jun 06 2003

Keywords

Comments

For n > 1, n! cannot be a perfect square. Proof: All exponents of the prime factors of a square are even. But in the factorization of n! at least one of the primes will appear only once due to Bertrand's Postulate which says there is always a prime between m and 2m.

Examples

			a(9)=67 because 9!+729 = 363609 = 3^4*67^2 is a square with largest prime factor of 67.
		

Crossrefs

Cf. A068869.

Programs

  • Mathematica
    Join[{0},Table[FactorInteger[(Floor[Sqrt[n!]]+1)^2][[-1,1]],{n,2,30}]] (* Harvey P. Dale, Jan 04 2012 *)

A240939 Least number k >= 0 such that n! + k is a perfect power.

Original entry on oeis.org

0, 2, 2, 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, 5112360635841936
Offset: 1

Views

Author

Derek Orr, Aug 03 2014

Keywords

Comments

The only n <= 805 where n! + a(n) is not a square is 3. - Robert Israel, Aug 01 2024

Crossrefs

Programs

  • Maple
    f:= proc(n) local v,m,p,r;
       m:= infinity;
       v:= n!;
       p:= 1;
       do
         p:= nextprime(p);
         if 2^p >= m+v then break fi;
         r:= ceil(v^(1/p))^p - v;
         if r < m then m:= r fi;
       od;
       m
    end proc:
    map(f, [$1..50]);
  • Mathematica
    nextPerfectPower[n_] := Min@ Table[(Floor[n^(1/k)] + 1)^k, {k, 2, 1 + Floor@ Log2@ n}]; f[n_] := nextPerfectPower[n!] - n!; f[1] = 0; Array[f, 30] (* Robert G. Wilson v, Aug 04 2014 *)
  • PARI
    a(n)=for(k=0,10^10,s=n!+k;if(ispower(s)||s==1,return(k)))
    n=1;while(n<50,print1(a(n),", ");n++)
    
  • PARI
    a(n)=for(k=1,n!,if(2^k>n!,kk=k;break));if(kk==1,return(0));L=List([]);for(i=2,kk,listinsert(L,ceil(n!^(1/i))^i-n!,1));listsort(L);L[1]
    vector(40, n, a(n)) \\ faster program

Extensions

a(18) onward from Robert G. Wilson v, Aug 04 2014
Showing 1-10 of 12 results. Next