login
Least k <= n such that n*tau(k) = k*tau(n), where tau(n) is the number of divisors of n (A000005).
4

%I #12 Nov 15 2019 06:11:05

%S 1,1,3,4,5,3,7,8,9,5,11,8,13,7,15,16,17,9,19,20,21,11,23,9,25,13,27,

%T 28,29,15,31,32,33,17,35,36,37,19,39,40,41,21,43,44,45,23,47,48,49,25,

%U 51,52,53,27,55,56,57,29,59,40,61,31,63,64,65,33,67,68,69,35,71,72,73,37

%N Least k <= n such that n*tau(k) = k*tau(n), where tau(n) is the number of divisors of n (A000005).

%H Amiram Eldar, <a href="/A094758/b094758.txt">Table of n, a(n) for n = 1..10000</a>

%e 6*tau(3) = 6*2 = 3*4 = 3*tau(6), hence a(6) = 3.

%p A094758 := proc(n)

%p for k from 1 to n do

%p if n*numtheory[tau](k) = k*numtheory[tau](n) then

%p return k;

%p end if;

%p end do:

%p end proc: # _R. J. Mathar_, Nov 15 2019

%t a[n_] := Module[{k = 1, r = DivisorSigma[0, n]/n}, While[DivisorSigma[0, k]/k != r, k++]; k]; Array[a, 100] (* _Amiram Eldar_, Aug 19 2019 *)

%o (PARI) for(n=1,75,s=numdiv(n);k=1;while(n*numdiv(k)!=k*s,k++);print1(k,","));

%Y Cf. A095300 for n such that a(n) < n.

%Y Cf. A000005, A094757, A094759.

%K nonn

%O 1,3

%A _Amarnath Murthy_, May 30 2004

%E Edited and extended by _Klaus Brockhaus_, Jun 01 2004