login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A348833 Largest remainder of an n-digit zeroless number when divided by its product of digits. 2

%I #41 Dec 31 2023 12:36:07

%S 0,42,483,4894,47510,468558,3286509,33038431,311252462,3026431197,

%T 24615266110,246854569382,2374402515012,18660293493470,

%U 176435471621403,1352572452024739,16614091501667154,99621458812003515,810999063879719306,7843786633582522125,76818560735237400564

%N Largest remainder of an n-digit zeroless number when divided by its product of digits.

%C Inspired by A348730 where product is replaced by sum.

%C The largest product of digits that an n-digit number can reach is 9^n, according to this, a(n) < 9^n; indeed a(n) < 10^n/2.

%C Corresponding n-digit numbers which have the largest possible remainder when divided by their digit product are in A348834.

%H Chai Wah Wu, <a href="/A348833/b348833.txt">Table of n, a(n) for n = 1..53</a>

%e 5 == 0 mod (5).

%e 96 == 42 mod (9*6).

%e 969 == 483 mod (9*6*9).

%e 9997 == 4894 mod (9*9*9*7).

%e 99998 == 47510 mod (9*9*9*9*8).

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

%o (Python)

%o from math import prod

%o from itertools import product

%o def a(n):

%o maxr = 0

%o for p in product("123456789", repeat=n):

%o maxr = max(maxr, int("".join(p))%prod(map(int, p)))

%o return maxr

%o print([a(n) for n in range(1, 7)]) # _Michael S. Branicky_, Nov 01 2021

%Y Cf. A002473, A004526, A052382, A007602, A348730, A348834.

%K nonn,base

%O 1,2

%A _Bernard Schott_, Nov 01 2021

%E a(9) from _Giorgos Kalogeropoulos_, Nov 01 2021

%E a(10)-a(12) from _Michael S. Branicky_, Nov 01 2021

%E a(13)-a(21) from _Chai Wah Wu_, Nov 08 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)