close
login
A390053
a(1) = 1. For n > 1, a(n) is the largest prime factor of A390052(n).
2
1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 7, 31, 41, 17, 61, 71, 3, 19, 5, 7, 11, 23, 7, 13, 31, 3, 41, 29, 5, 31, 23, 11, 43, 53, 7, 73, 83, 31, 5, 41, 7, 43, 11, 5, 23, 47, 7, 47, 5, 17, 13, 53, 5, 11, 13, 19, 29, 59, 5, 61, 31, 7, 23, 13, 11, 67, 43, 23, 7, 71, 3, 73
OFFSET
1,2
LINKS
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
Cf. A390052.
Sequence in context: A378856 A163457 A285708 * A072593 A394544 A348907
KEYWORD
nonn,look,base
AUTHOR
Michael S. Branicky and Ali Sada, Oct 22 2025
STATUS
approved