I saw this question recently and was curious about the value of the smallest symmetric group $S_k$ that has an element of order $n$. Call $k$, which depends on $n$, $f(n)$.
I checked a few small values and found that $f\left(\prod_i p_i^{a_i}\right) = \sum_i p_i^{a_i} $, i.e. $f(n)$ is the sum of the prime powers that multiply to $n$.
Here's a proof that this is optimal.
Given a partition of $\lambda$ such as $5+4+2+1+1$ the order of the element with that cycle structure is the least common multiple of all the parts, in this case $5*4 = 20$, which is less than the product $40$.
Let $\lambda$ be a partition whose least common multiple is $\pi$.
Suppose $\lambda$ contains two parts $a$ and $b$ such that $(a, b) \neq 1$. Then we can produce a partition of a smaller number with the same least common multiple by replacing $b$ with $b/(a,b)$.
Suppose $\lambda$ contains a number that is a multiple of a prime power $p^k$ and another number $a$. $\lambda$ contains $ap^k$. Let $\lambda'$ be the partition obtained by taking $\lambda$, removing $ap^k$, and adding $a$ and $p^k$. The least common multiple of $\lambda'$ is the same as the least common multiple of $\lambda$, but $\lambda'$ is a partition of a strictly smaller number. (I am omitting a proof of the fact that $\lambda'$ is a partition of a smaller number than $\lambda$ for brevity.)
The function $f$, defined as $f\left(\prod_i p_i^{a_i}\right) = \sum_i p_i^{a_i} $, i.e. $f(n)$, satisfies an interesting property:
$$ f(ab) = f(a) + f(b) \;\; \text{when} \;\; (a, b) = 1 $$
As proof, when $(a, b) = 1$ none of the prime factors of $ab$ are split between $a$ and $b$. If a prime $p$ was split, then $p \mid a$ and $p \mid b$ would hold and thus it would hold that $p \mid (a, b)$.
$$ f(ab) = \sum p_i^{a_i + b_i} = \left(\sum p_i^{a_i} \right) + \sum p_i^{b_i} = f(a) + f(b) $$
Let's call this the quasi-logarithmic property. It is similar in spirit to the notion of being a multplicative function, which has many natural examples.
Are there any natural examples of functions with this property?