|
|
A064500
|
|
Smallest number with n decimal digits such that the product of its digits equals n * the sum of its digits, or 0 if impossible.
|
|
0
|
|
|
1, 36, 159, 1247, 11259, 111279, 1111377, 11111388, 111111399, 1111111569, 0, 111111112378, 0, 11111111112567, 111111111112568, 1111111111114448, 0, 111111111111113469, 0, 11111111111111122566, 111111111111111112779, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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.
|
|
LINKS
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|