login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A029776
Digits of n appear in n^3.
6
0, 1, 4, 5, 6, 9, 10, 11, 12, 21, 24, 25, 29, 32, 33, 34, 39, 40, 44, 49, 50, 51, 54, 55, 56, 59, 60, 61, 64, 65, 66, 67, 71, 72, 73, 75, 76, 88, 90, 97, 99, 100, 101, 102, 106, 109, 110, 111, 112, 114, 115, 116, 119, 120, 124, 125, 129, 137, 151, 153, 176
OFFSET
1,3
LINKS
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)))
A029776_list = list(islice(A029776_gen(), 20)) # Chai Wah Wu, Apr 03 2023
CROSSREFS
Contains A119735.
Sequence in context: A139546 A369352 A308886 * A064931 A177103 A114454
KEYWORD
nonn,base
EXTENSIONS
Offset changed to 1 by Robert Israel, Mar 18 2020
STATUS
approved