OFFSET
1,1
COMMENTS
First differs from A045538 at a(21) = 12 since 21 * 12 = 252 contains two equal but not consecutive digits. A045538(21) = 16.
The largest value is a(27)=37. - Robert Israel, Sep 17 2020
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1).
FORMULA
a(n) <= A045538(n).
a(n) = 1 for any n >= 10^10. - Rémy Sigrist, Sep 15 2020
EXAMPLE
a(21) = 12 because 21*12 = 252 is the smallest multiple of 21 with equal digits.
a(23) = 5 because 23*5 = 115 is the smallest multiple of 23 with equal digits.
a(34) = 8 because 34*8 = 272 is the smallest multiple of 34 with equal digits.
MAPLE
f:= proc(n) local k, L;
for k from 1 do
L:= convert(k*n, base, 10);
if nops(convert(L, set))<nops(L) then return k fi
od;
end proc:
map(f, [$1..100]); # Robert Israel, Sep 17 2020
MATHEMATICA
a[n_] := Module[{k = 1}, While[Max@ (Last /@ Tally @ IntegerDigits[k*n]) == 1, k++]; k]; Array[a, 100] (* Amiram Eldar, Aug 22 2020 *)
PROG
(PARI) a(n) = {my(k=1, d=digits(n)); while(#Set(d) == #d, k++; d=digits(k*n)); k; } \\ Michel Marcus, Aug 22 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rodolfo Kurchan, Aug 20 2020
STATUS
approved