What is the name for finding biggest two multipliers of a number?

251 Views Asked by At

Excuse my English please.

I am looking for the name in Mathematics (/English) for finding the biggest two numbers that form an array that can contain at minimum x number of items whereby array's both sides are as close as possible (to form a square or square-ish rectangle).

Ex:

For 10, it is 3*4 (not 2*5 as it is not square-ish)

90 is 9*10 91..99 is 10*10

66 is 6*7

or 1324 is 36*37

Given a number, I would like to create an x*y "array", as square looking as possible.

Thanks!

2

There are 2 best solutions below

2
On BEST ANSWER

for $k^2 + 1, \ldots, k^2 + k,$ you use $k$ by $k+1$

for $k^2 + k + 1, \ldots, k^2 + 2 k + 1,$ you use $k+1$ by $k+1$

The array dimensions for your integer $x$ are thus $$ \left\lfloor \frac{1}{2} + \sqrt x \right\rfloor $$ by $$ \left\lceil \sqrt x \right\rceil $$

x  floor (0.5 + sqrt(x))  ceil( sqrt (x))  
1                1               1
2                1               2
3                2               2
4                2               2
5                2               3
6                2               3
7                3               3
8                3               3
9                3               3
10                3               4
11                3               4
12                3               4
13                4               4
14                4               4
15                4               4
16                4               4
17                4               5
18                4               5
19                4               5
20                4               5
21                5               5
22                5               5
23                5               5
24                5               5
25                5               5
26                5               6
27                5               6
28                5               6
29                5               6
30                5               6
31                6               6
32                6               6
33                6               6
34                6               6
35                6               6
36                6               6
37                6               7
38                6               7
39                6               7
40                6               7
41                6               7
42                6               7
43                7               7
44                7               7
45                7               7
46                7               7
47                7               7
48                7               7
49                7               7
50                7               8
51                7               8
52                7               8
53                7               8
54                7               8
55                7               8
56                7               8
57                8               8
58                8               8
59                8               8
60                8               8
61                8               8
62                8               8
63                8               8
64                8               8
65                8               9
66                8               9
67                8               9
68                8               9
69                8               9
70                8               9
71                8               9
72                8               9
73                9               9
74                9               9
75                9               9
76                9               9
77                9               9
78                9               9
79                9               9
80                9               9
81                9               9
82                9               10
83                9               10
84                9               10
85                9               10
86                9               10
87                9               10
88                9               10
89                9               10
90                9               10
91                10               10
92                10               10
93                10               10
94                10               10
95                10               10
96                10               10
97                10               10
98                10               10
99                10               10
100                10               10
101                10               11
102                10               11
103                10               11
104                10               11
105                10               11
106                10               11
107                10               11
108                10               11
109                10               11
110                10               11
111                11               11
112                11               11
113                11               11
114                11               11
115                11               11
116                11               11
117                11               11
118                11               11
119                11               11
120                11               11
121                11               11
x    floor (0.5 + sqrt(x))   ceil( sqrt (x)) 
------------------------------------------------

==

2
On

I don't know of a specific word for this, but it seems like you're describing using square roots with a little bit of rounding if necessary. Based on the examples given (excluding $66 = 6 \times 7$: this seems out of place) you could either try $\lfloor \sqrt n\rfloor \times \lceil \sqrt n \rceil $ or $\lceil \sqrt n \rceil \times \lceil \sqrt n \rceil$, whichever is closer. The first may work if it's $ \ge n$, the second will always be $\ge n$.