%I #18 Dec 22 2020 17:28:26
%S 3,5,7,11,13,17,19,23,29,31,35,38,39,46,51,55,57,58,62,65,69,74,77,82,
%T 85,86,87,91,93,94,95,106,111,115,118,119,122,123,125,129,133,134,141,
%U 142,143,145,146,155,158,159,161,166,177,178,183,185,187,194,201,202,203,205,206,209,213
%N a(n) is the smallest number having n smaller numbers with the same number of divisors.
%C Inspired by A047983.
%C Are there prime terms greater than 31?
%H Robert Israel, <a href="/A338483/b338483.txt">Table of n, a(n) for n = 1..10000</a>
%F A047983(a(n)) = n. - _Rémy Sigrist_, Dec 06 2020
%e The smallest number having two smaller numbers (2 and 3) with the same number of divisors is 5, so a(2) is 5.
%p N:= 500: # for terms before the first term > N
%p T:= map(numtheory:-tau, [$1..N]):
%p M:= max(T):
%p V:= Vector(M):
%p for n from 1 to N do
%p v:= T[n];
%p V[v]:= V[v]+1;
%p if not assigned(R[V[v]]) then R[V[v]]:= n fi
%p od:
%p for nn from 1 while assigned(R[nn]) do od:
%p seq(R[i],i=2..nn-1); # _Robert Israel_, Oct 30 2020
%t f[n_]:=With[{tau=DivisorSigma[0,n]},Length[Select[Range[n-1],DivisorSigma[0,#]==tau&]]];t=Table[f[n],{n,1,300}]; a[n_]:=FirstPosition[t,n]; Rest[a/@Range[0,65]]//Flatten (* f(n) by _Jean-François Alcover_ at A047983 *)
%o (PARI) f(n) = {my(d=numdiv(n)); sum(k=1, n-1, (numdiv(k)==d))} \\ A047983
%o a(n) = my(k=1); while (f(k)!= n, k++); k; \\ _Michel Marcus_, Oct 30 2020
%Y Cf. A000005, A007422, A030513, A047983.
%K nonn
%O 1,1
%A _Ivan N. Ianakiev_, Oct 30 2020