|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
n * a(n) <= 9876543210 for any n > 0.
a(n) = 0 for any n > 9876543210.
a(100*n) = 0 for any n > 0.
1 <= a(n) <= 9 for any n in A050278.
|
|
PROG
|
(PARI) \\ See Links section.
(Python)
from __future__ import division
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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Formula corrected and program amended by Rémy Sigrist, Oct 14 2019
|
|
STATUS
|
approved
|
|
|
|