Dudeney number

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.

be a natural number.

We define the Dudeney function for base

times the number of digits in the number in base

A natural number

is a Dudeney root if it is a fixed point for

The natural number

is a generalised Dudeney number,[1] and for

are trivial Dudeney numbers for all

, all other trivial Dudeney numbers are nontrivial trivial Dudeney numbers.

, there are exactly six such integers (sequence A061209 in the OEIS):

A natural number

is a sociable Dudeney root if it is a periodic point for

, and forms a cycle of period

A Dudeney root is a sociable Dudeney root with

, and a amicable Dudeney root is a sociable Dudeney root with

Sociable Dudeney numbers and amicable Dudeney numbers are the powers of their respective roots.

The number of iterations

to reach a fixed point is the Dudeney function's persistence of

, and undefined if it never reaches a fixed point.

It can be shown that given a number base

, the maximum Dudeney root has to satisfy this bound: implying a finite number of Dudeney roots and Dudeney numbers for each order

is the digit sum.

The only Dudeney numbers are the single-digit numbers in base

, and there are no periodic points with prime period greater than 1.

All numbers are represented in base

Dudeney numbers can be extended to the negative integers by use of a signed-digit representation to represent each integer.

The example below implements the Dudeney function described in the definition above to search for Dudeney roots, numbers and cycles in Python.