def var_number(i, j, d, k):
    """
    Convert possible values into propositional vars

    :param i: row number 1 - 9
    :param j: col number 1 - 9
    :param d: digit 1 - 9
    :param k: size of suduko
    :return: variable number 1- 729
    """
    return (k ** 2 * k ** 2) * (i - 1) + (k ** 2) * (j - 1) + d