Balanced number 2026-10-20
A positive integer whose first decimal numerical digits have the same sum as its last digits, where is the number of digits. For odd , the shared middle digit cancels from the equality. Counts and value sums can therefore be assembled from two half-length digit dynamic programming tables indexed by base-p digit sum.
Step number 2026-10-20
A positive integer whose adjacent decimal numerical digits differ by exactly 1. Its digits form a walk on the path graph , with a nonzero starting digit. Counting pandigital numbers of this type can use digit dynamic programming with the final digit and a bit mask of visited digits as the state.