A360972 Number of n-digit zeroless numbers whose digit sum is larger than the product of all digits.
0, 0, 17, 28, 51, 91, 189, 302, 513, 985, 1461, 1904, 3155, 4616, 7211, 10236, 12709, 15573, 21463, 31161, 56306, 70904, 85570, 100626, 135203, 155951, 188059, 293887, 434106, 522755, 612837, 888740, 1013337, 1182809, 1559292, 1755888, 1971286, 2208087, 2491034
Offset: 0
Examples
a(2) = 17: 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 31, 41, 51, 61, 71, 81, 91. a(3) = 28: 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 131, 141, 151, 161, 171, 181, 191, 211, 212, 221, 311, 411, 511, 611, 711, 811, 911. a(4) = 51: 1111, 1112, 1113, 1114, ..., 6111, 7111, 8111, 9111.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Programs
-
Maple
b:= proc(n, i, s, p) option remember; `if`(s+n*i<=p, 0, `if`(n=0 or i=1, 1/n!, add(b(n-j, i-1, s+i*j, p*i^j)/j!, j=0..n))) end: a:= n-> b(n, 9, 0, 1)*n!: seq(a(n), n=0..40);