Two dozen kissing number approximations Given a number from 1 to 24, output the kissing number to the best of current knowledge (some numbers will have more than one acceptable output). Knowledge of geometry is not essential as the outputs are all listed below.

From the Wikipedia page on the Kissing Number Problem:


  a kissing number is defined as the number of non-overlapping unit spheres that can be arranged such that they each touch another given unit sphere


That is, given one unit sphere, how many more unit spheres can touch it without any of them overlapping? The question will be asked in N dimensional space, where a sphere is understood to be an N-1 dimensional sphere.

For example:


in 2 dimensional space, a unit circle can touch 6 other unit circles.
in 3 dimensional space, a unit sphere can touch 12 other unit spheres.


The Wikipedia page lists values for 1 to 24 dimensional space. However, some of these are not yet known accurately, so only a lower and upper bound are given. The table is reproduced here so that it will remain fixed, regardless of any future narrowing of the ranges due to new proofs. Solutions are judged against this fixed table, even if the Wikipedia page is modified in future.

Table of bounds

Dimension   Lower bound     Upper bound
1           2               2
2           6               6
3           12              12
4           24              24
5           40              44
6           72              78
7           126             134
8           240             240
9           306             364
10          500             554
11          582             870
12          840             1357
13          1154            2069
14          1606            3183
15          2564            4866
16          4320            7355
17          5346            11072
18          7398            16572
19          10668           24812
20          17400           36764
21          27720           54584
22          49896           82340
23          93150           124416
24          196560          196560


Input

The dimension: An integer from 1 to 24 (inclusive).

Here "integer" indicates that the input will have no fractional part - it may be 2 or 3 but never 2.5. A solution may still take input as a float, or a string, for example.

Output

A number in the relevant range, from the lower limit to the upper limit for that input (inclusive).

The output must be deterministic (always the same for the same input).

The output must be integer. For example, for input 5 the possible valid outputs are 40, 41, 42, 43, 44. Note this is a restriction on the value, not the type. It is acceptable to return a float, provided it has zero fractional part. For example, 41.5 would not be valid, but 41.0 would be valid.

Scoring

This is code-golf. Your score is the number of bytes in your code. For each language, the winner is the solution with the lowest score.
Julia 0.6, 52 bytes



n-&gt;ceil(n&lt;8?3.7exp(.51n)-5.1:n&lt;24?9exp(.41n):196560)


Try it online!

How?

Machine learning! (Kinda. Maybe. Not really.)

First, from plotting the lower and upper limit data against N, and some manual trial and error, it seemed like an exponential function could fit well for N >= 8. After some attempts at manually finding this function, I resorted to using a parameter tuning function to tune \$ a * e^{b K} + c \$  (where K = 8 to 24) to find a, b, and c such that the expression gave values that lie within the correct range for each K (with successively smaller range of possible values and correspondingly higher precisions for a, b, c in different runs of the function). There were a few such set of values, though none of them could fit the N=24 case exactly, so I went with one that had 0 c and hardcoded the value for N=24.

For lower N, from 1 to 7, I was hoping to find some simpler expression or polynomial, but couldn't find any that fit. So back to fitting \$ a * e^{b K} + c \$ , this time for K = 1 to 7 (though I didn't really think an exponential would be a right fit in this case, based on visual plot trends). Thankfully, there were parameters a, b, c that could give correct values throughout the range here (at least to within a ceil call).