OFFSET
1,3
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
66 is in the list because 66^3 = 287496 and 6 appears in 287496.
153 is in the list because 153^3 = 3581577 and 1, 5, 3 appear in 3581577.
MAPLE
filter:= n -> convert(convert(n, base, 10), set) subset convert(convert(n^3, base, 10), set):select(filter, [$0..200]); # Robert Israel, Mar 18 2020
PROG
(Magma) [n: n in [0..200] | Intseq(n) subset Intseq(n^3)]; // Bruno Berselli, Aug 01 2013
(PARI) isok(m) = my(d=Set(digits(m)), ddd=Set(digits(m^3))); setintersect(d, ddd) == d; \\ Michel Marcus, Mar 18 2020
(Python)
from itertools import count, islice
def A029776_gen(startvalue=0): # generator of terms >= startvalue
return filter(lambda n:set(str(n)) <= set(str(n**3)), count(max(startvalue, 0)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Offset changed to 1 by Robert Israel, Mar 18 2020
STATUS
approved