A316147 Numbers, with digits in nondecreasing order, whose product of digits equals the number of digits times the sum of digits.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 36, 44, 159, 167, 235, 333, 1247, 1344, 2226, 11259, 11355, 111279, 111366, 112239, 112246, 112335, 1111377, 1111457, 1112337, 11111388, 11112267, 11113344, 11122236, 11222224, 111111399, 111111559, 111111666, 111112269
Offset: 1
Crossrefs
Cf. A064154.
Programs
-
Mathematica
Union@ Flatten@ Reap[ Sow[0]; Do[ If[ FactorInteger[ nd s ][[-1, 1]] <= 7, Sow[ FromDigits /@ Reverse /@ Select[ IntegerPartitions[s, {nd}, Range[9]], Times @@ # == Length[#] Plus @@ # &]]], {nd, 18}, {s, 9 nd}]][[2, 1]] (* terms < 10^18, Giovanni Resta, Jul 18 2018 *) dnoQ[n_]:=Module[{idn=IntegerDigits[n]},Min[Differences[idn]]>=0 && Times@@idn==Length[idn]Total[idn]]; Select[Range[0, 111112300],dnoQ] (* Harvey P. Dale, Aug 12 2021 *)
-
PARI
is(n) = my(d = digits(n)); vecsort(d) == d && prod(i=1, #d, d[i]) == #d * vecsum(d) \\ David A. Corneth, Jul 18 2018
Comments