cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A370849 Least of the smoothest two-nonzero-digit numbers of length n.

This page as a plain text file.
%I A370849 #34 Dec 27 2024 01:35:27
%S A370849 16,144,3888,55566,255552,1111222,76776777,799779977,4334433444,
%T A370849 61161166611,292229292292,1122121111111,55115551555155,
%U A370849 799777779779979,1161111111166611,11112112121222112,111111222221111112,3334334333334333333,55333333335335355355,222229999999292992929,3383383883833883388888,11112221111212222222221,112122222222122122122112,2777227772777277722272272,61666616611611166166161116,858885585585555585558558858,3331333133331111313111133133,98888999899889989898999889999,111661111111666616661166166616
%N A370849 Least of the smoothest two-nonzero-digit numbers of length n.
%C A370849 "Least" means that we list the smallest one if there is more than one solution of length n having the same smoothness. "Smoothest" means having the least greatest prime factor, A006530. Length means the number of digits in base 10. We consider only nonzero digits since otherwise the somewhat uninteresting solution would most often be 10^(n-1) = (2*5)^(n-1). [Alternatively, one might exclude those solutions by only forbidding multiples of 10: see below.]
%C A370849 The two digits are coprime. - _David A. Corneth_, Mar 05 2024
%C A370849 In an alternate sequence forbidding multiples of 10, 101010110010001010011 replaces 222229999999292992929. - _Ed Pegg Jr_, Mar 05 2024
%H A370849 Ed Pegg Jr, <a href="https://mailman.xmission.com/hyperkitty/list/math-fun@mailman.xmission.com/thread/A2ERLHUSVFFJHH5TKWMGMPORNX6IY2YE/">A smooth, 2-digit sequence</a>, Mar 01 2024
%e A370849 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
%e A370849 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.)
%e A370849 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.
%e A370849 For n = 7 digits, all of {1111222, 2222444, 3333666, 4444888, 5665556, 7777887} have the same minimum smoothness of 29.
%e A370849 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).
%o A370849 (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)}
%o A370849 (Python)
%o A370849 from sympy import factorint
%o A370849 from itertools import combinations
%o A370849 from sympy.utilities.iterables import multiset_permutations
%o A370849 def a(n):
%o A370849     m = (int('9'*n),)*2
%o A370849     for c in combinations("123456789", 2):
%o A370849         for r in multiset_permutations(c[0]*n+c[1]*n, n):
%o A370849             t = int("".join(r))
%o A370849             s = max(factorint(t, limit=m[0]))
%o A370849             m = min(m, (s, t))
%o A370849     return m[1]
%o A370849 print([a(n) for n in range(2, 12)]) # _Michael S. Branicky_, Mar 03 2024
%Y A370849 Cf. A006530 (greatest prime factor), A101594 (zeroless numbers with exactly 2 distinct digits).
%Y A370849 Cf. A370361 (greatest prime factor of the terms).
%K A370849 nonn,base
%O A370849 2,1
%A A370849 _Ed Pegg Jr_ and _M. F. Hasler_, Mar 02 2024
%E A370849 a(21)-a(23) from _Michael S. Branicky_, Mar 05 2024
%E A370849 a(24)-a(25) from _David A. Corneth_, Mar 05 2024
%E A370849 a(26)-a(30) from _Don Reble_, Mar 06 2024