A370849 Least of the smoothest two-nonzero-digit numbers of length n.
16, 144, 3888, 55566, 255552, 1111222, 76776777, 799779977, 4334433444, 61161166611, 292229292292, 1122121111111, 55115551555155, 799777779779979, 1161111111166611, 11112112121222112, 111111222221111112, 3334334333334333333, 55333333335335355355, 222229999999292992929, 3383383883833883388888, 11112221111212222222221, 112122222222122122122112, 2777227772777277722272272, 61666616611611166166161116, 858885585585555585558558858, 3331333133331111313111133133, 98888999899889989898999889999, 111661111111666616661166166616
Offset: 2
Examples
a(2) = 16 = 2^4 is certainly the smallest number made of 2 distinct nonzero digits that has the least largest prime factor. 32 and 64 would have the same smoothness, but we list the smallest solution a(3) = 144 = 2^4*3^2 is the least 3-digit number made of 2 distinct nonzero digits that has the least largest prime factor, here 3. (288 would have the same smoothness.) a(4) = 3888 = 2^4*3^5 and 7776 = 2^5*3^5 are the smoothest 4-digit numbers made of 2 distinct nonzero digits. For n = 7 digits, all of {1111222, 2222444, 3333666, 4444888, 5665556, 7777887} have the same minimum smoothness of 29. Similarly, for n = 10, all of {4334433444, 4444994444, 8668866888, 8889988888} have the same minimum smoothness of 23 (and all of them also have prime factors 2, 11 and 19; the first and third are also divisible by 3^4, the two others have a second factor 19 and four factors 23).
Links
- Ed Pegg Jr, A smooth, 2-digit sequence, Mar 01 2024
Crossrefs
Programs
-
PARI
a(n)={my(s=oo,L); forvec(d=vector(2,i,[1,9]), gcd(d)>1&&next; my(g, f(v) = fromdigits(vecextract(d,v))); forvec(v=vector(n,i,[1,2]), if(s < g=A006530(f(v)), next, s == g, L=concat(L,f(v)), s=g, L=[f(v)])),2); vecmin(L)}
-
Python
from sympy import factorint from itertools import combinations from sympy.utilities.iterables import multiset_permutations def a(n): m = (int('9'*n),)*2 for c in combinations("123456789", 2): for r in multiset_permutations(c[0]*n+c[1]*n, n): t = int("".join(r)) s = max(factorint(t, limit=m[0])) m = min(m, (s, t)) return m[1] print([a(n) for n in range(2, 12)]) # Michael S. Branicky, Mar 03 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
Comments