OFFSET
2,2
LINKS
David A. Corneth, Table of n, a(n) for n = 2..10000
EXAMPLE
a(14) = 6 as 14*6 = 84 = 2^2*3*7 has 12 divisors, though 14*9 = 126 = 3^2*2*7 also has 12 divisors but 9 > 6.
a(15) = 12 as 180 has 18 divisors 15*14 = 210 has 16 divisors.
MATHEMATICA
Do[x = y = 0; For[k = 1, k < n, k++, d = Length[Divisors[n*k]]; If[d > x, x = d; y = k]]; Print[y], {n, 2, 50}] (* Ryan Propper, Jul 25 2005 *)
PROG
(PARI) a(n) = {my(res = 1, r = numdiv(n)); for(i = 2, n - 1, c = numdiv(i*n); if(c > r, r = c; res = i); ); res } \\ David A. Corneth, Dec 27 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Mar 28 2004
EXTENSIONS
35 more terms from Ryan Propper, Jul 25 2005
More terms from David Wasserman, Aug 22 2006
STATUS
approved
