A162016 Numbers k such that the sum of the decimal digits of k is a substring of k and of k^3.
1, 4, 5, 6, 9, 10, 40, 50, 60, 90, 100, 400, 500, 600, 900, 910, 1000, 1009, 1018, 1027, 1145, 1158, 1178, 1198, 1245, 1345, 1363, 1427, 1509, 1609, 1672, 1736, 1809, 1810, 1814, 1836, 2177, 2710, 2712, 3610, 3612, 4000, 4125, 4510, 4514, 5000, 5134, 5144, 5410
Offset: 1
Examples
1158 is a term because its digital sum is 1+1+5+8 = 15 and "15" is a substring of 1158 and of 1158^3 = 1552836312.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Programs
-
Python
def sd(n): return sum(map(int, str(n))) def ok(n): s = str(sd(n)); return s in str(n) and s in str(n**3) print([k for k in range(1, 5411) if ok(k)]) # Michael S. Branicky, Jan 31 2022
Extensions
a(47) and beyond from Michael S. Branicky, Jan 31 2022