In August of 2018, I included, in a post title Inconsummate Numbers, a program to determine all the inconsummate numbers up to 40000. It wasn't elegant but it got the job done (or so I thought). I asked Gemini to write a new program that was more efficient. Firstly, I asked it to write a program that would accept an integer as input and determine if that integer was inconsummate or not. If it was not then the program would display what number, when divided by its sum of digits, returned the input integer. I tested it with the number associated with my diurnal age today: 28147. Here was the result.
28147 is NOT inconsummate.
Found 2 number(s) x that yield 28147 when divided by their digit sum:
- 422205 (Digit sum: 15, Check: 422205 / 15 = 28147)
- 928851 (Digit sum: 33, Check: 928851 / 33 = 28147)
Gemini described the way it determined this (although only for 522205):
The Number
The number you are looking for is 422205.
When you sum the digits of 422205, you get 15 (since 4 + 2 + 2 + 2 + 0 + 5 = 15). When you divide the original number by this sum, it yields your target:
\[ 422205 / 15 = 28147 \]
The Mathematical Mechanics
To understand how to program this, we have to look at the relationship between the target number, the starting number, and the digit sum.
Let \(n\) be the target number (in this case, 28147), let \(x\) be the number we are trying to find, and let \(s\) be the sum of the digits of \(x\), represented as a function \(S(x)\).
The problem dictates that:
\[ \frac{x}{s} = n \]
This can be rearranged to:
\[ x = n \cdot s \]
This means that any valid number \(x\) must be a direct multiple of \(n\). Furthermore, because \(s = S(x)\), we can substitute \(x\) to find the core condition that must be met:
\[ S(n \cdot s) = s \]
To find \(x\), we don't need to guess incredibly large numbers; we only need to test possible values for the digit sum \(s\), multiply it by \(n\), and see if the sum of the digits of that product equals \(s\).
Establishing an Upper Bound
To write a program that eventually stops running, we must define a maximum possible value for \(s\).
The maximum possible digit sum for a number is 9 times its number of digits (e.g., the sum of 999 is \(9 \times 3 = 27\)). Therefore, \(s\) can never be larger than 9 times the digit length of \(n \cdot s\). We can use a simple loop to calculate this hard mathematical ceiling before we even start searching.
Range Analyzed: 1 to 40000 (Total of 40000 numbers)
Count of Inconsummate numbers: 6836
Percentage of range: 17.09%
Now in my original list back in August of 2018, I had 10867 numbers listed as inconsummate in the same range. I've now amended that post and replaced the list with a link to a Google Document containing the correct list. You live and learn I guess.
Finally let's remind outselves of the definition:
An inconsummate number is a positive integer that cannot be formed by dividing any integer by the sum of its digits (in base 10), acting as the opposite of a "consummate number".
Most numbers are "consummate". In the range up to 40000, they constitute 82.91% but inconsummate numbers constitute only 17.09%.


