login
A162017
Numbers k such that the sum of the decimal digits of k is a substring of k, of k^2 and of k^3.
2
1, 5, 6, 10, 50, 60, 100, 500, 600, 910, 1000, 1009, 1018, 1027, 1145, 1810, 2710, 3610, 4510, 5000, 5410, 6000, 6310, 7210, 7212, 8110, 9010, 9100, 9925, 10000, 10009, 10018, 10027, 10036, 10045, 10054, 10063, 10072, 10081, 10090, 10108, 10117, 10126, 10135
OFFSET
1,2
LINKS
EXAMPLE
1145 is a term because its digital sum is 1+1+4+5 = 11 and "11" is a substring of 1145, of 1145^2 = 1311025 and of 1145^3 = 1501123625.
PROG
(Python)
def sd(n): return sum(map(int, str(n)))
def ok(n): s = str(sd(n)); return all(s in str(t) for t in [n, n**2, n**3])
print([k for k in range(1, 10140) if ok(k)]) # Michael S. Branicky, Jan 31 2022
CROSSREFS
Sequence in context: A342127 A119102 A162015 * A069170 A305293 A287265
KEYWORD
nonn,base
AUTHOR
Claudio Meller, Jun 24 2009
EXTENSIONS
a(21) and beyond from Michael S. Branicky, Jan 31 2022
STATUS
approved