login
A348834
Zeroless numbers that have the largest possible remainder when divided by their digit product.
2
1, 2, 3, 4, 5, 6, 7, 8, 9, 96, 969, 987, 9997, 99998, 999999, 9899997, 99999997, 999999998, 9999999999, 98999999998, 999999999998, 9999999999999, 99999999999998, 999999999999999, 9999999999999997, 99999999999999999, 699999999999999999, 9799999999999999997
OFFSET
1,2
COMMENTS
For the largest remainder of an n-digit number when divided by its product of digits, see A348833.
Starting from 9997, each term appears to have 1 more decimal digit than the previous term. - Chai Wah Wu, Nov 08 2021
LINKS
EXAMPLE
1-digit number 3 == 0 mod (3).
2-digit number 96 == 42 mod (9*6).
3-digit numbers 969 == 483 mod (9*6*9) and 987 == 483 mod (9*8*7).
4-digit number 9997 == 4894 mod (9*9*9*7).
5-digit number 99998 == 47510 mod (9*9*9*9*8).
PROG
(Python)
from math import prod
from itertools import product
def auptod(maxdigits):
alst = []
for d in range(1, maxdigits+1):
maxr, argmaxr = 0, []
for p in product("123456789", repeat=d):
t = int("".join(p))
r = t%prod(map(int, p))
if r == maxr:
argmaxr.append(t)
elif r > maxr:
maxr = r
argmaxr = [t]
alst.extend(argmaxr)
return alst
print(auptod(7)) # Michael S. Branicky, Nov 07 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Nov 07 2021
EXTENSIONS
a(18)-a(21) from Michael S. Branicky, Nov 07 2021
a(22)-a(28) from Chai Wah Wu, Nov 08 2021
STATUS
approved