login
A370361
Minimum greatest prime factor for a length n number with 2 distinct digits, excluding multiples of 10.
2
2, 3, 3, 7, 11, 29, 19, 19, 23, 67, 29, 139, 107, 71, 101, 137, 127, 307, 173, 347, 383, 439, 271, 853, 521, 587, 883, 571, 823, 941
OFFSET
2,1
COMMENTS
Multiples of ten are disallowed, because that would give A010716 (all 5) preceded by 2, 3, 3.
Corresponds to 2-distinct-digit numbers in A370849, except at a(21) where 101010110010001010011 with zero digits is more smooth than 222229999999292992929.
FORMULA
a(n) = A006530(A370849(n)) unless the smoothest solution is (as for n = 21) a number made of digits {0, 1}, currently excluded in A370849. - M. F. Hasler, Mar 05 2024
EXAMPLE
a(7) = 29 as the largest prime factor of the 7-digit number with exactly two distinct digits, 1111222, is 29 and no 7-digit number with exactly two distinct digits has a smaller largest prime factor and no 7-digit number with exactly two distinct digits smaller than 1111222 has a largest prime factor that is equal to 29. - David A. Corneth, Mar 05 2024
a(9) = 19, because 799779977 = 17*19^6 has nine digits, two distinct digits and largest prime factor 19. - Ed Pegg Jr, Mar 05 2024
PROG
(Python)
from sympy import primefactors
from sympy.utilities.iterables import multiset_permutations
def A370361(n): return min((max(primefactors(a:=int(''.join(s)))), a) for i in range(10) for j in range(i+1, 10) for k in range(1, n) for s in multiset_permutations(str(i)*k+str(j)*(n-k)) if s[0] != '0' and s[-1] != '0')[0] # Chai Wah Wu, Mar 09 2024
(Python) # See LINKS. Lucas A. Brown, Mar 30 2024
CROSSREFS
Sequence in context: A098715 A167886 A095978 * A156763 A169653 A129012
KEYWORD
nonn,hard,more,base
AUTHOR
Ed Pegg Jr, Mar 05 2024
EXTENSIONS
a(21)-a(23) from Michael S. Branicky, Mar 05 2024
a(24)-a(25) from David A. Corneth, Mar 05 2024
a(26)-a(30) from Don Reble, Mar 06 2024
a(31) from Lucas A. Brown, Mar 30 2024
STATUS
approved