Definition (Bipotentiant Numbers).
Let n be a positive integer with decimal representation
n = d_{k-1}d_{k-2}…d_1d_0,
where d_0 is the units digit and d_{k-1} ≠ 0. Define
S(n) = Σ_{j=0}^{k-1} d_j^{j+1}
and
P(n) = Π_{j=0}^{k-1} d_j^{j+1}.
We call n a bipotentiant number if
n = S(n) + P(n).
Equivalently,
n = Σ_{j=0}^{k-1} d_j^{j+1} + Π_{j=0}^{k-1} d_j^{j+1}.
The exponents are consecutive positive integers 1, 2, …, k, assigned to the digits from right to left, starting with exponent 1 for the units digit.
For example, 19 is bipotentiant because
19 = (9^1 + 1^2) + (9^1 × 1^2) = 10 + 9 = 19
In base 10, the first six bipotentiant numbers (including 0) are:
0, 19, 24, 51, 1343, 1721.
Run the module directly to list all bipotentiant numbers up to a limit:
python bipotentiant_numbers.py 1000