login
A030668
Smallest nontrivial extension of n which is a cube.
3
125, 27, 343, 4096, 512, 64, 729, 8000, 9261, 1000, 110592, 125, 1331, 140608, 15625, 166375, 1728, 185193, 19683, 205379, 216, 226981, 238328, 24389, 250047, 262144, 2744, 287496, 29791, 300763, 314432, 32768, 3375, 343, 35937
OFFSET
1,1
PROG
(Python)
from gmpy2 import iroot
def A030668(n):
d, nd = 10, 10*n
while True:
x = (iroot(nd-1, 3)[0]+1)**3
if x < nd+d:
return int(x)
d *= 10
nd *= 10 # Chai Wah Wu, May 24 2016
CROSSREFS
Cf. A030669.
Sequence in context: A298711 A088403 A077495 * A030678 A028939 A195420
KEYWORD
nonn,base
STATUS
approved