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.
%I A139770 #25 Aug 31 2023 07:49:03 %S A139770 1,2,2,4,2,6,2,6,4,6,2,12,2,6,6,12,2,12,2,12,6,6,2,24,4,6,6,12,2,24,2, %T A139770 12,6,6,6,36,2,6,6,24,2,24,2,12,12,6,2,48,4,12,6,12,2,24,6,24,6,6,2, %U A139770 60,2,6,12,24,6,24,2,12,6,24,2,60,2,6,12,12,6,24,2,48,12,6,2,60,6,6,6,24,2 %N A139770 Smallest number having at least as many divisors as n. %C A139770 Similar to A140635, except that a(n) is allowed to have more divisors than n. %C A139770 a(n) <= n for all n. Moreover, a(n) = n if and only if n belongs to A061799 (or equivalently A002182). %C A139770 When n is prime, a(n) = 2. - _Michel Marcus_, Jun 14 2013 %C A139770 For numbers k such that a(k) and A140635(k) are not equal see A365263. - _Michel Marcus_, Aug 31 2023 %H A139770 Antti Karttunen, <a href="/A139770/b139770.txt">Table of n, a(n) for n = 1..10000</a> %F A139770 a(n) = A061799(A000005(n)). %e A139770 16 has 5 divisors; smallest number with at least 5 divisors is 12 with 6 divisors, thus a(16) = 12. %t A139770 a139770[n_] := NestWhile[#+1&, 1, DivisorSigma[0, n]>DivisorSigma[0, #]&] %t A139770 a139770[{m_, n_}] := Map[a139770, Range[m, n]] %t A139770 a139770[{1, 89}] (* _Hartmut F. W. Hoft_, Jun 13 2023 *) %o A139770 (PARI) a(n) = {nd = numdiv(n); for (i=1, n-1, if (numdiv(i) >= nd, return (i));); return (n);} \\ _Michel Marcus_, Jun 14 2013 %o A139770 (Python) %o A139770 from sympy import divisor_count as d %o A139770 def a(n): %o A139770 x=d(n) %o A139770 m=1 %o A139770 while True: %o A139770 if d(m)>=x: return m %o A139770 else: m+=1 # _Indranil Ghosh_, May 27 2017 %Y A139770 Cf. A000005, A002182, A061799, A140635, A365263. %K A139770 nonn %O A139770 1,2 %A A139770 _J. Lowell_, May 20 2008 %E A139770 Edited and extended by _Ray Chandler_, May 24 2008