OFFSET
1,2
COMMENTS
For every term t in A179239 there is exactly one anagram from t in this sequence. For example 13 is in A179239. It has anagrams 13 and 31. Of those anagrams 31 is in this sequence. - David A. Corneth, Oct 29 2025
LINKS
Paolo Xausa and Michael S. Branicky, Table of n, a(n) for n = 1..10000
FORMULA
A390052(a(n)) = a(n).
MATHEMATICA
A387938Q[k_] := k == Last[SortBy[Map[FromDigits, Permutations[IntegerDigits[k]]], FactorInteger[#][[-1, 1]] &, Less]];
Select[Range[200], A387938Q]
PROG
(Python)
from sympy import factorint
from itertools import combinations_with_replacement as cwr, count, islice, permutations
def b(s): # A390052 with tuple of digits argument
if s == ("1", ): return 1
m, argm = 0, -1
for p in permutations(sorted(s)):
t = int("".join(p))
f = 0 if t == 1 else max(factorint(t))
if f > m: m, argm = f, t
return argm
def agen(): # generator of terms
for d in count(1):
lb = 10**(d-1)
yield from sorted(t for s in cwr("9876543210", d) if lb <= (t:=b(s)))
print(list(islice(agen(), 100)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo Xausa and Michael S. Branicky, Oct 29 2025
STATUS
approved
