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.

This page as a plain text file.
%I A240937 #28 Jun 21 2025 13:24:50
%S A240937 0,6,2,3,5,9,792,2555,10368,23464,84888,1047087,2483200,54721675,
%T A240937 228537856,1394007616,5090444477,51286309703,608427634303,
%U A240937 3260058995493,11314112766137,51848285189219,1034026438223449,11075640379838488,181108172062981288,1566869630866485093
%N A240937 Least number k >= 0 such that n! + k is a cube.
%H A240937 Robert Israel, <a href="/A240937/b240937.txt">Table of n, a(n) for n = 1..524</a>
%p A240937 f:= proc(n) local N; N:= n!; ceil(N^(1/3))^3 - N end proc:
%p A240937 seq(f(n), n=1..30); # _Robert Israel_, Aug 04 2014
%t A240937 f[n_] := Block[{c = n! - 1}, (1 + Floor[c^(1/3)])^3 - c - 1]; Array[f, 26] (* _Robert G. Wilson v_, Aug 04 2014 *)
%t A240937 Table[Ceiling[CubeRoot[n!]]^3-n!,{n,30}] (* _Harvey P. Dale_, Jun 21 2025 *)
%o A240937 (PARI)
%o A240937 a(n)=for(k=0,10^10,s=n!+k;if((ispower(s)&&ispower(s)%3==0)||s==1,return(k)))
%o A240937 n=1;while(n<20,print1(a(n),", ");n++)
%o A240937 (PARI) vector(50, n, ceil(n!^(1/3))^3-n!) \\ faster program
%Y A240937 Cf. A068869.
%K A240937 nonn
%O A240937 1,2
%A A240937 _Derek Orr_, Aug 03 2014
%E A240937 a(15) onward from _Robert G. Wilson v_, Aug 04 2014