[go: up one dir, main page]

login
A343750
Let S be the set of all numbers that can be obtained by permuting the digits of n (leading zeros can be omitted). Then a(n) is that element of S with the smallest number of divisors. In case of a tie, choose the smallest.
0
1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 11, 21, 13, 41, 15, 61, 17, 81, 19, 2, 21, 22, 23, 24, 25, 26, 27, 82, 29, 3, 13, 23, 33, 43, 53, 63, 37, 83, 39, 4, 41, 24, 43, 44, 45, 46, 47, 48, 49, 5, 15, 25, 53, 45, 55, 65, 57, 58, 59, 6, 61, 26, 63, 46, 65
OFFSET
1,2
COMMENTS
a(x0..0) = x, a(x..x) = x..x, x from {1,...,9}.
EXAMPLE
n = 125, S = {125, 152, 215, 251, 512, 521}. The elements 251 and 521 have the smallest number of divisors which equals 2. The smallest from elements 251 and 521 is 251, thus a(125) = 251.
MATHEMATICA
a[n_] := Module[{perm = FromDigits /@ Permutations[IntegerDigits[n]], d}, d = DivisorSigma[0, perm]; Min @ perm[[Position[d, Min[d]] // Flatten]]]; Array[a, 65] (* Amiram Eldar, Apr 27 2021 *)
CROSSREFS
Sequence in context: A004719 A004151 A151765 * A107603 A161594 A084011
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Apr 27 2021
STATUS
approved