Showing posts with label inconsummate. Show all posts
Showing posts with label inconsummate. Show all posts

Sunday, 26 April 2026

Inconsummate Numbers Revisited

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.

***************************************
I then got Gemini to write a program to determine all the inconsummate numbers in the range from 1 to 40000. Here was the result (minus the actual list which is too large to include but here is a permalink):
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%.

Thursday, 23 May 2024

Simultaneously Inconsummate, Self and Untouchable Numbers

Today I turn 27444 days old and one property of this number is that it is inconsummate, meaning that there is no number that divided by its sum of digits equals 27444. What I noticed however, was that 27111, 27222, 27333, 27444, 27666, 27777, 27888 and 27999 are all inconsummate. 

Notice that 27555 is not inconsummate because 991980, when divided by its sum of digits (36), gives 27555. Similarly 27000 is not inconsummate because 243000, when divided by its sum of digits (9) gives 27000 as does 486000 when divided by its sum of digits (18) etc. The latter result is to be expected because doubling a number produces the same dividend when it is divided by the sum of digits. Similarly, tripling a number produces the same dividend and so any number that is "consummate" has an infinity of numbers that, when divided by their sum of digits, produce the number.

The pattern is less noticeable in the range from 26000 to 26999 where only 26111, 26666 and 26888 are inconsummate. In the range from 28000 to 28999, none of the 28XXX numbers are inconsummate. In the range from 29000 to 29999, we find 29222, 29555 and 29777 to be inconsummate. So the 27000 to 27999 millenium seems to produce one of the highest counts of ABXXX numbers but whether this is the highest, I don't know. In my post titled Inconsummate Numbers from the 1st of August 2018, I provide a list of all inconsummate numbers from 62 to 65535.

Getting back to the number associated with my diurnal age (27444) we find that it is also:

  • a self number, because there is no number that, added to its sum of digits, gives 27444
  • an untouchable number, because it is not equal to the sum of proper divisors of any number
One might reasonably ask the question as to how many numbers are inconsummate, self and untouchable? I was able to identify all the numbers up to 40000 with this property and there are 265 of them. Here they are:

872, 2672, 3752, 3818, 3842, 3864, 4046, 4316, 4338, 4382, 4472, 4494, 4742, 4832, 4854, 4898, 5126, 5148, 5372, 6654, 7284, 7598, 8162, 9152, 9218, 9264, 9848, 10076, 10368, 10379, 10412, 10884, 10974, 11481, 11516, 11549, 12594, 12752, 13226, 13259, 13314, 13382, 13742, 13922, 14126, 14148, 14328, 14394, 14418, 14664, 14754, 14798, 14822, 14934, 14978, 15116, 15215, 15452, 15474, 15507, 15597, 16251, 16811, 17217, 17285, 17544, 17588, 17621, 17757, 18141, 18387, 18422, 18837, 20325, 20514, 20874, 20918, 21392, 22316, 22652, 23214, 23664, 23888, 24722, 24755, 25071, 25104, 25317, 25374, 25418, 25464, 25532, 25622, 25655, 25868, 25901, 26039, 26981, 27029, 27420, 27444, 27611, 28142, 28254, 28377, 28388, 28511, 28737, 28748, 28926, 29165, 29187, 29222, 29244, 29321, 29424, 29435, 29760, 29995, 30337, 30348, 30359, 30449, 30651, 30774, 30998, 31057, 31147, 31237, 31292, 31314, 31428, 31439, 31584, 31707, 31764, 31808, 31832, 31922, 31955, 32025, 32036, 32047, 32069, 32091, 32137, 32159, 32214, 32394, 32418, 32429, 32484, 32552, 32574, 32585, 32618, 32732, 32798, 32822, 32855, 32934, 33037, 33059, 33092, 33114, 33171, 33239, 33698, 33911, 34082, 34374, 34385, 34587, 34655, 34699, 34767, 34925, 34947, 35105, 35151, 35318, 35432, 35454, 35577, 35588, 35621, 35757, 35847, 35880, 35891, 35924, 35948, 35981, 36029, 36095, 36207, 36242, 36264, 36275, 36365, 36398, 36422, 36444, 36455, 36488, 36510, 36567, 36578, 36624, 36635, 36701, 36769, 36791, 36813, 36837, 36848, 36859, 36927, 36949, 36960, 36971, 36993, 37015, 37085, 37175, 37197, 37232, 37265, 37298, 37421, 37434, 37478, 37489, 37535, 37568, 37579, 37623, 37680, 37781, 37803, 37827, 37838, 37871, 37926, 37928, 38005, 38154, 38165, 38220, 38310, 38378, 38525, 38760, 38916, 38927, 39144, 39221, 39537, 39548, 39581, 39671, 39704, 39783, 39851, 39917

So 27444 turns out to be rather special and all such numbers are in a sense quite isolated because they cannot be derived by dividing a number by its sum of digits, nor can they be had by adding the sum of a number's digits to the number and finally they cannot be derived from the addition of the proper divisors of any number. See Bespoken for Sequences entry.

Of the 265 numbers above, 20 of them are prime. These are 11549, 13259, 16811, 26981, 27611, 30449, 31147, 31237, 32069, 32159, 32429, 33037, 33911, 36791, 37489, 37579, 37781, 37871, 39581 and 39671. This is about the number you'd expect by chance, even if it is a little on the low side. There are 54 semiprimes. Of numbers with three consecutive digits that are the same, there are 23888, 27444, 29222, 29995 and 36444.

Wednesday, 1 August 2018

Inconsummate Numbers

A number \(n\) is inconsummate if there is no number \(k\) which divided by its sum of digits gives \(n\). An example of a number that is not inconsummate would be 47 because there exists the number 846 such that 846 / (8+4+6) = 47. Notice that in order to confirm this, it was necessary to test numbers far ahead of 47 on the number line. The following SAGE code is designed to identify inconsummate numbers:
INPUT
# Generate a list of inconsummate numbers
# n is an inconsummate if no number k divided by its sum of digits gives n
# The larger the value of limit, the more accurate the list
limit=1000
inconsummate=[]
for number in range(1, limit):
    digits=(str(number))
    sum=0
    for n in range(0,len(digits)):
        sum+=Integer(digits[n])
    if number % sum == 0:
        inconsummate.append(number/sum)
X=Set(inconsummate)
Y=Set(range(1, limit+1))
print(Y.difference(X)) 
OUTPUT
{62, 63, 65, 66, 71, 72, 74, 75, ... }
Unfortunately after 65, the next inconsummate number is 75 and so 66, 71, 72 and 74 should be not included in the output. Notice that the limit was set to 1000. If we increase the limit to 10000, the output goes wrong here { ..., 432, 437, 438, ... } because 437 is not an inconsummate number. By setting the limit to 12000, this particular error is corrected. It would seem that by choosing a particular range (from 1 to the chosen limit), the resultant output is only reliable for about 1/30th of that range.

It's interesting to look at the frequency of inconsummate numbers:

up to \(10^1\) --> 0 --> 0%
up to \(10^2\) --> 6 --> 6%
up to \(10^3\) --> 111 --> 11.1%
up to \(10^4\) --> 1437 --> 14.37%
up to \(10^5\) --> 16430 --> 16.43%
up to \(10^6\) --> 183089 --> 18.3089%
up to \(10^7\) --> 1905285 --> 19.05285% seems to peak here
up to \(10^8\) --> 18907944 --> 18.907944%
up to \(10^9\) --> 183706706 --> 18.3706706%

Figure 1: 3 x 3 magic square 


For the ranges shown, the frequency reaches a peak of 19.05285% and then slowly decreases. The smallest 3 × 3 magic square whose entries are consecutive inconsummate numbers is shown in Figure 1. Source.

The initial inconsummate numbers are listed in OEIS A003635 and the initial members are:
62, 63, 65, 75, 84, 95, 161, 173, 195, 216, 261, 266, 272, 276, 326, 371, 372, 377, 381, 383, 386, 387, 395, 411, 416, 422, 426, 431, 432, 438, 441, 443, 461, 466, 471, 476, 482, 483, 486, 488, 491, 492, 493, 494, 497, 498, 516, 521, 522, 527, 531, 533, 536, ... 

Here is a link to a Google Document containing the full list.

on 29th August 2021, 19th February 2023 and 26th April 2026