

A348833


Largest remainder of an ndigit zeroless number when divided by its product of digits.


2



0, 42, 483, 4894, 47510, 468558, 3286509, 33038431, 311252462, 3026431197, 24615266110, 246854569382, 2374402515012, 18660293493470, 176435471621403, 1352572452024739, 16614091501667154, 99621458812003515, 810999063879719306, 7843786633582522125, 76818560735237400564
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Inspired by A348730 where product is replaced by sum.
The largest product of digits that an ndigit number can reach is 9^n, according to this, a(n) < 9^n; indeed a(n) < 10^n/2.
Corresponding ndigit numbers which have the largest possible remainder when divided by their digit product are in A348834.


LINKS



EXAMPLE

5 == 0 mod (5).
96 == 42 mod (9*6).
969 == 483 mod (9*6*9).
9997 == 4894 mod (9*9*9*7).
99998 == 47510 mod (9*9*9*9*8).


MATHEMATICA

a[n_] := Max[Mod[#, (Times @@ DeleteCases[IntegerDigits[#], 0])] & /@ Range[10^(n  1), 10^n  1]]; Array[a, 7] (* Amiram Eldar, Nov 01 2021 *)


PROG

(Python)
from math import prod
from itertools import product
def a(n):
maxr = 0
for p in product("123456789", repeat=n):
maxr = max(maxr, int("".join(p))%prod(map(int, p)))
return maxr


CROSSREFS



KEYWORD

nonn,base


AUTHOR



EXTENSIONS



STATUS

approved



