A numerical digit is one symbol in a positional notation string, denoting an integer from zero through one less than the radix.
A balanced number is a positive integer whose first decimal digits have the same digit sum as its last decimal digits, where is the number of numerical digits. For odd , the middle numerical digit appears on both sides and cancels, so only the equally long outer halves need to be compared.
For example, is balanced because . It is not a palindromic number: equality of two digit sums does not require reversed digits. At odd length, is balanced because the outer pairs and both sum to three; its middle digit is irrelevant to the equality.
Digit dynamic programming can tabulate counts and value sums of fixed-length halves indexed by digit sum, then match equal indices. The first half must begin with a nonzero numerical digit, while the last half may contain initial zeros, as in . Preserving the half length is essential when assembling the positional value.
A step number is a positive integer whose adjacent decimal digits differ by exactly . For example, and are step numbers, while is not: its first two numerical digits have difference zero. Repetition is allowed; only neighboring differences are constrained.
The numerical digits form a walk on the path graph , starting at a nonzero digit. From a last digit , the possible extensions are within the range . At endpoints there is only one extension.
For digit dynamic programming, record the last digit and a bit mask encoding the set of digits already visited. Appending updates the visited set by set union with . Here pandigital means that every decimal digit appears at least once; repetitions are allowed. Accept only final states whose visited set contains all ten numerical digits. This separates local adjacency from the global requirement to have seen every digit.
The digital root of a nonnegative integer in integer radix is the single numerical digit obtained by repeatedly taking its digit sum. For example, in decimal representation, , while .
The process terminates: if , some nonzero digit occupies a position above the units, so . The positive integers therefore decrease until a single numerical digit remains. Each step preserves the integer congruence class modulo .
For positive inputs, every digit sum stays positive. The final digit lies in , rather than . Choosing the representative in this range giveswith . This explains why a positive multiple of has decimal digital root , not zero. The formula combines modular arithmetic with the positivity of the terminating representative.
A number whose representation contains every numerical digit from a specified alphabet. The convention must specify the base, whether zero is required, and whether repetitions are allowed. In many counting problems, “0-to-9 pandigital” means that all ten decimal numerical digits occur exactly once; other problems require only that each occur at least once.
A pandigital prime is a prime number that is also a pandigital number for a specified radix, digit alphabet and repetition convention. For example, uses each of exactly once and is prime; trial division by prime numbers at most its square root verifies the latter condition.
The digit sum supplies a useful obstruction. A decimal number using exactly once has digit sum . If this sum is divisible by and the number exceeds , the number is composite. In particular, a number using all ten decimal digits exactly once has digit sum and cannot be prime. The filter follows from the digit sum integer congruence, independently of the order in which the digits occur.
Articles by others on the same topic
A numerical digit is a symbol used to represent numbers in a numeral system. In the most commonly used base-10 (decimal) system, the digits are the ten symbols from 0 to 9. Each digit has a specific value depending on its position within a number. For example, in the number 253, the digits are 2, 5, and 3. Here: - The digit 2 represents 200 (2 x 100).