login
Numbers k such that there is no cube between k^2 and (k+1)^2.
0

%I #14 May 30 2021 14:37:41

%S 1,3,4,6,7,8,9,10,12,13,15,16,17,19,20,21,23,24,25,26,27,28,29,30,32,

%T 33,34,35,37,38,39,40,42,43,44,45,47,48,49,50,51,53,54,55,56,57,59,60,

%U 61,62,63,64,65,66,67,68,69,71,72,73,74,75,77,78,79,80,81,83,84,85,86,87

%N Numbers k such that there is no cube between k^2 and (k+1)^2.

%e 4 is a term because there is no cube between 4^2 = 16 and 5^2 = 25;

%e 5 is not a term because between 5^2 = 25 and 6^2 = 36 there is one cube, 27.

%p A:={seq(x^3,x=1..90)}: a:=proc(n) if {seq(y, y=n^2+1..(n+1)^2-1)} intersect A ={} then n else fi end: seq(a(n),n=1..90); # _Emeric Deutsch_, Oct 25 2006

%t Sqrt[#]&/@Select[Partition[Range[100]^2,2,1],NoneTrue[Surd[Range[#[[1]]+ 1,#[[2]] -1],3],IntegerQ]&][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 30 2021 *)

%o (PARI) isok(n) = sum(k=n^2+1, (n+1)^2-1, ispower(k, 3)) == 0; \\ _Michel Marcus_, Jan 09 2019

%Y Cf. A000290 (squares), A000578 (cubes).

%K nonn

%O 1,2

%A _Zak Seidov_, Oct 19 2006