OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
a(153) = 59 since the digits of 153 can be rearranged to 135,315,351,513 and 531; and 531 has the largest prime factor of the set (59).
MATHEMATICA
A390053[n_] := Max[FactorInteger[Map[FromDigits, Permutations[IntegerDigits[n]]]][[All, -1, 1]]];
Array[A390053, 100] (* Paolo Xausa, Oct 31 2025 *)
PROG
(Python)
from sympy import factorint
from itertools import permutations
def a(n):
if n == 1: return 1
m, argm = 0, None
for p in permutations(str(n)):
t = int("".join(p))
f = 0 if t == 1 else max(factorint(t))
if f > m: m, argm = f, t
return m
print([a(n) for n in range(1, 74)])
CROSSREFS
KEYWORD
AUTHOR
Michael S. Branicky and Ali Sada, Oct 22 2025
STATUS
approved
