|
|
A062856
|
|
In the square multiplication table of size A062857(n), the smallest number which appears n times.
|
|
7
|
|
|
1, 2, 4, 6, 12, 12, 36, 60, 60, 60, 120, 120, 120, 120, 360, 360, 360, 360, 360, 360, 840, 840, 840, 840, 2520, 2520, 2520, 2520, 2520, 2520, 2520, 2520, 2520, 2520, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 10080, 10080
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Smallest number to appear n times in any m X m multiplication table.
|
|
LINKS
|
|
|
EXAMPLE
|
a(7)=36 because 36 is the first product to appear in the m X m multiplication tables 7 times as m increases from 1 to infinity.
|
|
MATHEMATICA
|
b[1] = {1, 1}; b[n_] := b[n] = For[m = b[n-1][[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, sel[[1]]}] ]];
a[n_] := b[n][[2]];
|
|
PROG
|
(Python)
from itertools import count
from collections import Counter
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 ij
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Ron Lalonde (ronronronlalonde(AT)hotmail.com), Jun 25 2001
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|