%I #20 Oct 14 2021 15:21:56
%S 1,3,5,9,7,8,11,10,25,14,13,18,17,15,21,81,19,20,23,28,22,26,29,30,49,
%T 27,33,32,31,40,37,44,34,35,38,100,41,39,46,42,43,54,47,45,50,51,53,
%U 80,121,52,55,63,59,56,57,66,58,62,61,72,67,65,68,729,69,70,71,75,74,78,73
%N Least m > n having the same number of divisors as n, a(1) = 1.
%C tau(a(n)) = tau(n) and tau(i) <> tau(n), n < i < a(n) (tau = A000005);
%H Amiram Eldar, <a href="/A079427/b079427.txt">Table of n, a(n) for n = 1..10000</a>
%F a(A000040(k)) = A079428(A000040(k)) = A000040(k+1), as A000005(p)=2 for primes p.
%F a(n) = A171937(n) + n. - _Ridouane Oudra_, Sep 14 2021
%e Sets of divisors for n=10,11,12,13 and 14: D(10)={1,2,5,10}, D(11)={1,11}, D(12)={1,2,3,4,6,12}, D(13)={1,13}, D(14)={1,2,7,14}: therefore a(10)=14 (#D(10)=#D(14)).
%t a[1] = 1; a[n_] := Module[{m = n+1, d=DivisorSigma[0, n]}, While[DivisorSigma[0, m] != d, m++]; m]; Array[a, 100] (* _Amiram Eldar_, Feb 03 2020 *)
%o (PARI) a(n) = if (n==1, 1, my(m=n+1, nd=numdiv(n)); while(numdiv(m) != nd, m++); m); \\ _Michel Marcus_, Sep 14 2021
%o (Python)
%o from sympy import divisors
%o def a(n):
%o if n == 1: return 1
%o divisorsn, m = len(divisors(n)), n + 1
%o while len(divisors(m)) != divisorsn: m += 1
%o return m
%o print([a(n) for n in range(1, 72)]) # _Michael S. Branicky_, Sep 14 2021
%Y Cf. A000005, A112275, A112276.
%Y Cf. A171937.
%K nonn
%O 1,2
%A _Reinhard Zumkeller_, Jan 08 2003