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

No comments:

Post a Comment