OFFSET
1,1
COMMENTS
LINKS
Ely Golden and Donovan Johnson, Table of n, a(n) for n = 1..10000 (terms 1 to 1000 by Donovan Johnson)
Eric W. Weisstein, Smith Number
EXAMPLE
6606 = 2*3*3*367 is composite; sum of cubes of the digits is 6^3+6^3+0^3+6^3 = 648. Sum of cubes of the digits of the prime factors 2, 3, 3, 367 (with multiplicity) is 2^3+3^3+3^3+3^3+6^3+7^3 = 648. The sums are equal, so 6606 is in the sequence.
21080 = 2*2*2*5*17*31 is composite; sum of cubes of the digits is 2^3+1^3+0^3+8^3+0^3 = 521. Sum of cubes of the digits of the prime factors 2, 2, 2, 5, 17, 31 (with multiplicity) is 2^3+2^3+2^3+5^3+1^3+7^3+3^3+1^3 = 521. The sums are equal, so 21080 is in the sequence.
MATHEMATICA
fQ[n_] := Block[{id = Sort@ IntegerDigits@ n, fid = Sort@ Flatten[ IntegerDigits@ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger@ n]}, While[ id[[1]] == 0, id = Drop[id, 1]]; While[ fid[[1]] == 0, fid = Drop[fid, 1]]; !PrimeQ@ n && id != fid && Plus @@ (id^3) == Plus @@ (fid^3)]; k = 2; lst = {}; While[k < 22002, If[fQ@ k, AppendTo[ lst, k]; Print@ k]; k++]; lst
With[{k = 3}, Select[Range[10^5], Function[n, And[Total@ Map[#^k &, IntegerDigits@ n] == Total@ Map[#^k &, Flatten@ IntegerDigits[#]], Not[Sort@ DeleteCases[#, 0] &@ IntegerDigits@ n == Sort@ DeleteCases[#, 0] &@#]] &@ Flatten@ Map[IntegerDigits@ ConstantArray[#1, #2] & @@ # &, FactorInteger@ n]]]] (* Michael De Vlieger, Dec 10 2016 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paul Weisenhorn, Dec 19 2010
STATUS
approved