def permdb(ind, beta=0.5):
    """Perm function D, BETA defined as:
    $$ f(x) = \sum_{i=1}^d (\sum_{j=1}^n (j^i+\beta) ((\frac{x_j}{j})^i - 1) )^2$$
    with a search domain of $-n < x_i < n, 1 \leq i \leq n$.
    The global minimum is at $f(x_1, ..., x_n) = f(1, 1/2, ..., 1/n) = 0.
    """
    return sum(( \
        ( sum(( ((j+1.)**(i+1.)+beta) * ((ind[j]/(j+1.))**(i+1.) - 1.) for j in range(len(ind)) )) )**2. \
        for i in range(len(ind)) )),