login
Noncubes k that are divisible by floor(k^(1/3)).
5

%I #30 Oct 13 2024 02:41:30

%S 2,3,4,5,6,7,10,12,14,16,18,20,22,24,26,30,33,36,39,42,45,48,51,54,57,

%T 60,63,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,130,135,

%U 140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,222,228,234,240

%N Noncubes k that are divisible by floor(k^(1/3)).

%C The Concrete Math Club Casino problem - non-cube winning slots.

%D R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. 2nd Edition. Addison-Wesley, Reading, MA, 1994. Section 3.2, pp. 74-76.

%H Robert Israel, <a href="/A032378/b032378.txt">Table of n, a(n) for n = 1..10000</a>

%p t1:=[]; for n from 1 to 500 do t2:=floor(n^(1/3)); if n mod t2 = 0 and t2^3 <> n then t1:=[op(t1),n]; fi; od:

%p # Alternate:

%p seq(seq(n,n=k^3+k..(k+1)^3-1,k),k=1..6); # _Robert Israel_, Mar 24 2020

%t Select[Range[300],!IntegerQ[Surd[#,3]]&&Divisible[#,Floor[Surd[#,3]]]&] (* _Harvey P. Dale_, May 13 2020 *)

%o (Magma) [k*j: j in [(k^2+1)..(k^2+3*k+3)], k in [1..6]]; // _G. C. Greubel_, Jul 20 2023

%o (SageMath) flatten([[k*j for j in range((k^2+1),(k^2+3*k+3)+1)] for k in range(1,7)]) # _G. C. Greubel_, Jul 20 2023

%o (Python)

%o from itertools import count, islice

%o from sympy import integer_nthroot

%o def A032378_gen(): # generator of terms

%o return filter(lambda x: not x%integer_nthroot(x,3)[0],(n+(k:=integer_nthroot(n, 3)[0])+int(n>=(k+1)**3-k) for n in count(1)))

%o A032378_list = list(islice(A032378_gen(),40)) # _Chai Wah Wu_, Oct 12 2024

%Y Cf. A066353, A079645, A112873.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, Dec 22 2001, corrected Oct 29 2006