OFFSET
1,2
EXAMPLE
n=24: digit sum=6, prime factor-digit sum=2+3=5, so 24 is here;
n=153: digit sum=9, prime factor-digit sum=3+5+3=11>9, so 153 is here.
MATHEMATICA
ffi[x_] :=Flatten[FactorInteger[x]] lf[x_] :=Length[FactorInteger[x]] ba[x_] :=Table[Part[ffi[x], 2*j-1], {j, 1, lf[x]}] sd[x_] :=Apply[Plus, IntegerDigits[x]] tdp[x_] :=Flatten[Table[IntegerDigits[Part[ba[x], j]], {j, 1, lf[x]}], 1] sdp[x_] :=Apply[Plus, tdp[x]] a=Table[sd[w], {w, 1, 256}]; b=Table[sdp[w], {w, 1, 150}]; b-a; Flatten[Position[Sign[b-a], 1]]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Labos Elemer, Jun 21 2004
STATUS
approved