OFFSET
1,2
COMMENTS
a(n) is the least number m such that there exists k with 1 <= k <= m^2 such that k has at least n divisors t with k/m <= t <= m. - Robert Israel, Jan 30 2017
EXAMPLE
a(7)=18 because the 18 X 18 multiplication table is the smallest to contain a product of frequency 7 (namely the number A062856(7)=36).
MATHEMATICA
a[1] = 1; a[n_] := a[n] = For[m = a[n-1], True, m++, T = Table[i j, {i, m}, {j, m}] // Flatten // Tally; sel = SelectFirst[T, #[[2]] >= n&]; If[sel != {}, Print[n, " ", m, " ", sel[[1]]]; Return[m]]];
Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Mar 25 2019 *)
PROG
(MATLAB)
N = 1000; % to get all terms with a(n) <= N
M = sparse(1, N^2);
A(1) = 1;
imax = 1;
for k = 2:N
M(k*[1:k-1]) = M(k*[1:k-1])+2;
M(k^2) = 1;
newimax = max(M);
A(imax+1:newimax) = k;
imax = newimax;
end
A % Robert Israel, Jan 30 2017
(Python)
from itertools import count
from collections import Counter
def A062857(n):
if n == 1: return 1
c = Counter()
for m in count(1):
for i in range(1, m):
ij = i*m
c[ij] += 2
if c[ij]>=n:
return m
c[m*m] = 1 # Chai Wah Wu, Oct 16 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Ron Lalonde (ronronronlalonde(AT)hotmail.com), Jun 25 2001
EXTENSIONS
More terms from Don Reble, Nov 08 2001
Name clarified by Robert Israel, Jan 30 2017
STATUS
approved