Dudeney number

In number theory, a Dudeney number in a given number base formula_1 is a natural number equal to the perfect cube of another natural number such that the digit sum of the first natural number is equal to the second. The name derives from Henry Dudeney, who noted the existence of these numbers in one of his puzzles, "Root Extraction", where a professor in retirement at Colney Hatch postulates this as a general method for root extraction.
Mathematical definition.
Let formula_2 be a natural number. We define the Dudeney function for base formula_3 and power formula_4 formula_5 to be the following:
where formula_7 is the number of digits in the number in base formula_1. 
A natural number formula_2 is a Dudeney root if it is a fixed point for formula_10, which occurs if formula_11. The natural number formula_12 is a generalised Dudeney number, and for formula_13, the numbers are known as Dudeney numbers. formula_14 and formula_15 are trivial Dudeney numbers for all formula_1 and formula_17, all other trivial Dudeney numbers are nontrivial trivial Dudeney numbers.
For formula_13 and formula_19, there are exactly six such integers : formula_20 
A natural number formula_2 is a sociable Dudeney root if it is a periodic point for formula_10, where formula_23 for a positive integer formula_24, and forms a cycle of period formula_24. A Dudeney root is a sociable Dudeney root with formula_26, and a amicable Dudeney root is a sociable Dudeney root with formula_27. Sociable Dudeney numbers and amicable Dudeney numbers are the powers of their respective roots. 
The number of iterations formula_28 needed for formula_29 to reach a fixed point is the Dudeney function's persistence of formula_2, and undefined if it never reaches a fixed point.
It can be shown that given a number base formula_1 and power formula_17, the maximum Dudeney root has to satisfy this bound:
implying a finite number of Dudeney roots and Dudeney numbers for each order formula_17 and base formula_1.
formula_36 is the digit sum. The only Dudeney numbers are the single-digit numbers in base formula_1, and there are no periodic points with prime period greater than 1.
Dudeney numbers, roots, and cycles of "F""p","b" for specific "p" and "b".
All numbers are represented in base formula_1. 
Extension to negative integers.
Dudeney numbers can be extended to the negative integers by use of a signed-digit representation to represent each integer.
Programming example.
The example below implements the Dudeney function described in the definition above to search for Dudeney roots, numbers and cycles in Python.
def dudeneyf(x: int, p: int, b: int) -> int:
 """Dudeney function."""
 y = pow(x, p)
 total = 0
 while y > 0:
 total = total + y % b
 y = y // b
 return total
def dudeneyf_cycle(x: int, p: int, b: int) -> List:
 seen = []
 while x not in seen:
 seen.append(x)
 x = dudeneyf(x, p, b)
 cycle = []
 while x not in cycle:
 cycle.append(x)
 x = dudeneyf(x, p, b)
 return cycle