Depending somewhat on the value of 'n', you can probably model it like this. Assume that the value of 'n' is 137.
create table expensive_function_of_n_vars (
x1 integer not null,
x2 integer not null,
...
x137 integer not null,
primary key (x1, x2, ..., x137),
result integer not null
);
Under normal conditions, I'm reluctant to store a result without including a CHECK() constraint to make sure it's the correct result. In your case, that might not be practical, but you should give it some thought anyway.
This assumes that each column carries some kind of meaning. That is, I'm assuming that, in the real problem domain, each of these columns has a name more meaningful than "x3".
For example, in the article you referenced, the OP uses "height", "width", and "depth". In some applications, those dimensions are not interchangable--you can unambiguously identify which dimension on the real-world object is height, which is width, and which is depth. (One example might be a shipping container on a pallet, where height is obvious, width is the edge a forklift is expected to fit under, and depth is the remaining dimension.) In other applications, they're interchangable, which means you're liable to find "duplicate" primary keys like {2, 3, 5} and {2, 5, 3}. In cases like that, you might want to order the arguments from lowest to highest, and use CHECK() constraints to make sure they're ordered.
This is just straightfoward normalization, with the caveat that, in this case, you're starting in 6NF, I think, so there's not much to do.