OFFSET
1,2
COMMENTS
Note that in any base b, in this case 10, if n has a prime factor > b, then there exists no number which satisfies the criteria. Proof: if (a+b+c+ ... +k)*11 = a*b*c* ... *k then this implies that z*11 = a*...*k or that there is a digit that equals 11, but this is impossible in base 10.
EXAMPLE
a(3) = 159 because 1*5*9 = 45 = 3*(1+5+9).
MATHEMATICA
Do[ If[n != 1 && Transpose[ FactorInteger[n]][[1, -1]] <= 10, k = (10^n - 1)/9; While[d = IntegerDigits[k]; k < 10^n && n*Apply[Plus, d] != Apply[Times, d], k++ ]; If[k < 10^n, Print[k]], If[n == 1, Print[1], Print[0]]], {n, 1, 30} ]
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Oct 05 2001
STATUS
approved