login
A328291
a(n) is the greatest k >= 0 such that n*k has distinct decimal digits.
2
9876543210, 4938271605, 3292181070, 2469135780, 1975308642, 1646090535, 1410934743, 1234567890, 1097393690, 987654321, 897865830, 823045260, 759734010, 705467358, 658436214, 617283945, 580973130, 548696845, 519818058, 493827156, 470311581, 448932915, 429414840
OFFSET
1,1
LINKS
FORMULA
a(n) = A328292(n) / n.
n * a(n) <= 9876543210 for any n > 0.
a(n) = 0 for any n > 9876543210.
a(100*n) = 0 for any n > 0.
a(n) >= 1 for any n in A010784.
1 <= a(n) <= 9 for any n in A050278.
PROG
(PARI) \\ See Links section.
(Python)
from __future__ import division
def A328291(n):
if n > 9876543210 or n % 100 == 0:
return 0
k = 9876543210//n
m = k*n
s = str(m)
while len(set(s)) != len(s):
k -= 1
m -= n
s = str(m)
return k # Chai Wah Wu, Oct 13 2019
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Rémy Sigrist, Oct 11 2019.
EXTENSIONS
Formula corrected and program amended by Rémy Sigrist, Oct 14 2019
STATUS
approved