Sunday 27 December 2020

Magnanimous Numbers

I was surprised today when looking at the number associated with my diurnal age (26201) in Numbers Aplenty. It was described as a magnanimous number and I'd not heard this term before. This is not surprising as the previous such number is 24407 that occurred 1794 days ago. The source of this discovery provides the following definition:

A magnanimous number is a number (which we assume of at least 2 digits) such that the sum obtained inserting a "+" among its digit in any position gives a prime.

26201 qualifies because:$$ \begin{align}
2 + 6201 &= 6203\\
26 + 201& = 227\\
262 + 01 &= 263\\
2620 + 1 &= 2621\\
\end{align}$$and 227, 263, 2621 and 6203 are all primes.

The magnanimous numbers form OEIS A252996 and the comments on that sequence include the following:

The sequence is marked as "finite", although we do not have a rigorous proof for this, only very strong evidence (numerical and probabilistic). G. Resta has checked that up to \(5 \times 10^{16}\) the only magnanimous numbers with more than 11 digits are 5391391551358 and 97393713331910, the latter being probably the largest element of this sequence.

Numbers Aplenty includes the table shown in Figure 1: 

Figure 1


Here is the SageMath code (permalink) to generate the members of the sequence, up to 26201 (output is attached):

M=[]
for n in [11..26201]:
    OK=1
    L=list(str(n))
    for i in [1..len(L)-1]:
        start,end="",""
        for l in L[0:i]:
            start+=l
        for l in L[i:len(L)]:
            end+=l
        sum=int(start)+int(end)
        if is_prime(sum)==0:
            OK=0
    if OK==1:
        M.append(n)
print(M)

[11, 12, 14, 16, 20, 21, 23, 25, 29, 30, 32, 34, 38, 41, 43, 47, 49, 50, 52, 56, 58, 61, 65, 67, 70, 74, 76, 83, 85, 89, 92, 94, 98, 101, 110, 112, 116, 118, 130, 136, 152, 158, 170, 172, 203, 209, 221, 227, 229, 245, 265, 281, 310, 316, 334, 338, 356, 358, 370, 376, 394, 398, 401, 403, 407, 425, 443, 449, 467, 485, 512, 518, 536, 538, 554, 556, 574, 592, 598, 601, 607, 625, 647, 661, 665, 667, 683, 710, 712, 730, 736, 754, 772, 776, 790, 794, 803, 809, 821, 845, 863, 881, 889, 934, 938, 952, 958, 970, 974, 992, 994, 998, 1001, 1112, 1130, 1198, 1310, 1316, 1598, 1756, 1772, 1910, 1918, 1952, 1970, 1990, 2209, 2221, 2225, 2249, 2261, 2267, 2281, 2429, 2447, 2465, 2489, 2645, 2681, 2885, 3110, 3170, 3310, 3334, 3370, 3398, 3518, 3554, 3730, 3736, 3794, 3934, 3974, 4001, 4027, 4063, 4229, 4247, 4265, 4267, 4427, 4445, 4463, 4643, 4825, 4883, 5158, 5176, 5374, 5516, 5552, 5558, 5594, 5752, 5972, 5992, 6001, 6007, 6067, 6265, 6403, 6425, 6443, 6485, 6601, 6685, 6803, 6821, 7330, 7376, 7390, 7394, 7534, 7556, 7592, 7712, 7934, 7970, 8009, 8029, 8221, 8225, 8801, 8821, 9118, 9172, 9190, 9338, 9370, 9374, 9512, 9598, 9710, 9734, 9752, 9910, 11116, 11152, 11170, 11558, 11930, 13118, 13136, 13556, 15572, 15736, 15938, 15952, 17716, 17752, 17992, 19972, 20209, 20261, 20861, 22061, 22201, 22801, 22885, 24407, 26201]

After 26201, the next magnanimous number is 26285 and, after that, there are only three more that are less than 30000 (26881, 28285 and 28429).

No comments:

Post a Comment