2787. Ways to Express an Integer as Sum of Powers
Given two positive integers
nandx.Return the number of ways
ncan be expressed as the sum of thexthpower of unique positive integers, in other words, the number of sets of unique integers[n1, n2, ..., nk]wheren = n1x + n2x + ... + nkx.Since the result can be very large, return it modulo
109 + 7.For example, if
n = 160andx = 3, one way to expressnisn = 23 + 33 + 53.