is there a way to figure out, given a number x, which values of a number n would add up to that number? where n + 2n + 3n + ... + Yn + ... + 3n + 2n + n = x, and Y is some arbitrary number?
for context: i'm declaring individual bytes of data for an assembly routine that displaces pixels, and i'm looking for a mathematical model for decent water reflection