A342034 a(n) is the number of numbers k with n digits where k has digits in nondecreasing order and satisfies k < (product of digits of k) * (sum of digits of k).
8, 41, 140, 367, 789, 1432, 2276, 3280, 4326, 5350, 6254, 7009, 7588, 7970, 8175, 8210, 8120, 7923, 7633, 7272, 6877, 6445, 6013, 5555, 5122, 4693, 4298, 3901, 3534, 3189, 2872, 2562, 2285, 2029, 1789, 1576, 1376, 1194, 1037, 893, 759, 654, 548, 454, 384, 315, 254, 210, 168, 127, 97, 79, 56, 39, 31, 21, 12, 8, 4
Offset: 1
Examples
a(1) = 8 as there are 8 one-digit numbers k as described in name. Those are {2, 3, 4, 5, 6, 7, 8, 9}.
Links
- David A. Corneth, PARI program
Programs
-
PARI
See PARI link
-
Python
from math import prod from itertools import combinations_with_replacement as cwr def c(digs): return int("".join(map(str, digs))) < prod(digs) * sum(digs) def a(n): return sum(1 for u in cwr(range(1, 10), n) if c(u)) print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Mar 05 2021
Extensions
a(27)-a(41) from Michael S. Branicky, Mar 05 2021
Comments