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.

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