A383347 Numbers that have the same set of digits as the sum of the cubes of their digits.
0, 1, 135, 137, 153, 173, 307, 315, 317, 351, 370, 371, 407, 470, 513, 531, 703, 704, 713, 730, 731, 740, 3007, 3070, 3700, 4007, 4070, 4700, 7003, 7004, 7030, 7040, 7300, 7400, 11112, 11113, 11121, 11131, 11211, 11311, 12111, 12599, 12959, 12995, 13111, 15299
Offset: 1
Examples
135 and 1^3 + 3^3 + 5^3 = 153 have the same set of digits {1,3,5}, so 135 is a term.
Programs
-
Maple
filter:= proc(n) local L,t; L:= convert(n,base,10); convert(L,set) = convert(convert(add(t^3,t=L),base,10),set) end proc: select(filter, [$0 .. 10^5]); # Robert Israel, Apr 25 2025
-
Mathematica
q[k_] := Module[{d = IntegerDigits[k]}, Union[d] == Union[IntegerDigits[Total[d^3]]]]; Select[Range[0, 16000], q] (* Amiram Eldar, Apr 24 2025 *)
-
PARI
isok(k) = my(d=digits(k)); Set(d) == Set(digits(sum(i=1, #d, d[i]^3))); \\ Michel Marcus, Apr 24 2025
-
Python
def ok(n): return set(s:=str(n)) == set(str(sum(int(d)**3 for d in s))) print([k for k in range(2*10**4) if ok(k)]) # Michael S. Branicky, Apr 24 2025
Comments