A370361 Minimum greatest prime factor for a length n number with 2 distinct digits, excluding multiples of 10.
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
Examples
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
Links
- Lucas A. Brown, Python program.
Programs
-
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
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
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
Comments