A274125 Numbers having digits in nondecreasing order and sum of digits greater than or equal to the product of digits.
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 111, 112, 113, 114, 115, 116, 117, 118, 119, 122, 123, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1122, 1123, 1124, 11111, 11112, 11113, 11114, 11115, 11116, 11117, 11118, 11119, 11122
Offset: 1
Links
- David A. Corneth, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
upto[nd_] := Sort[FromDigits /@ Reverse /@ Select[ Flatten[ IntegerPartitions[#, nd, Range@ 9] & /@ Range[9 nd], 1], Times @@ # <= Plus @@ # &]]; upto[8] (* Giovanni Resta, Jun 20 2016 *)
-
PARI
is(n) = my(d=digits(n)); prod(i=1, #d, d[i]) <= vecsum(d) && vecsort(d) == d
Comments