![]() |
|
|
#1 |
|
Sep 2018
2×3 Posts |
3435 is well-known as the Münchhausen number in the base 10 and its length (number of digits) is 4.
Are there infinitely many Münchhausen numbers of length 3? Please visit http://searchfornumbers.blogspot.com...-length-3.html |
|
|
|
|
|
#2 |
|
Jun 2003
22·3·421 Posts |
904:[1, 7, 1]:823545
|
|
|
|
|
|
#3 |
|
Sep 2018
2·3 Posts |
Great!
|
|
|
|
|
|
#4 |
|
Jan 2017
1438 Posts |
No larger solutions with less than 1000 base-10 digits. Given the three digits, you can solve for base as a second-degree polynomial. I checked that all triples with largest digit in [8, 400[ give irrational bases, and 400^400 would have 1041 base-10 digits.
|
|
|
|
|
|
#5 |
|
"Dylan"
Mar 2017
57910 Posts |
So I wrote some code in Python to test this:
Code:
#Python script to find Munchhausen numbers for some base and length
#A Munchhausen Number is a number equal to the sum of it's digits
#raised to each digit's power.
#For example, in base 10 3435 is a Munchhausen number, since
#3435 = 3*10^3+4*10^2+3*10+5 and 3435 = 3^3+4^4+3^3+5^5=27+27+256+3125.
#The question posed here: https://mersenneforum.org/showpost.php?p=548680&postcount=1
#are there infinitely many Munchhausen numbers with length 3?
#first, we define a function for the sum of the digits raised to each digit's power.
def sum_digits_raised(digits):
'''Takes a list of integers and sums up the powers of them.'''
digitpowersum = 0
for digit in digits:
if digit < 0:
raise ValueError("Digit needs to be non-negative.")
digitpowersum += pow(digit, digit)
#print(digitpowersum)
return digitpowersum
#as a check, run the list [3,4,3,5]. It should yield 3435
#print(sum_digits_raised([3,4,3,5]))
#Now, we define a function to translate from base n to base 10.
def tobase10(orig_base, digits):
'''Converts a list of digits in base orig_base into a number in base 10.'''
base10num = 0
i = len(digits)-1
for digit in digits:
base10num += digit*pow(orig_base, i)
i -= 1
return base10num
#check on [3,4,3,5] in base 10
#print(tobase10(10, [3,4,3,5]))
#Now we want to run for length 3 and base all the possible digit combinations.
base = 904
biggestlefthandside = tobase10(base, [base-1,base-1,base-1])
#this works for length 3, the problem at hand.
for i in range(0, base+1):
for j in range(0, base+1):
for k in range(0, base+1):
digits = [i,j,k]
righthandside = sum_digits_raised(digits)
#the biggest we could hope the left hand side to be is
#(base-1)*base^(length-1)+(base-1)*base^(length-2)+...+base-1
#so if the right hand side is bigger than that there's no way the lefthand side will be the same as the right.
if righthandside > biggestlefthandside:
continue
lefthandside = tobase10(base, digits)
if lefthandside == righthandside:
print(i, j, k, str(tobase10(base, digits)))
print("Incrementing i to " + str(i+1))
|
|
|
|
|
|
#6 |
|
"Robert Gerbicz"
Oct 2005
Hungary
27148 Posts |
A faster approach: if the discriminant is not a square then you can eliminate that triplet. With that you don't even need to calculate the coefficients, just check for ~50 smallest primes if the discriminant is a quadratic residue or not. Very likely there will be no larger solution.
|
|
|
|
|
|
#7 | |
|
Jan 2017
32×11 Posts |
Quote:
Code:
base = 904
p = [i**i for i in range(base)]
d = {pi-i:i for i, pi in enumerate(p)}
for i in range(base):
ni = base*base*i - p[i]
for j in range(base):
if ni + base*j - p[j] in d:
print(i, j, d[ni+base*j-p[j]])
|
|
|
|
|
|
|
#8 | |
|
Jan 2017
32·11 Posts |
Quote:
|
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| fft length changes | JPL | Information & Answers | 5 | 2018-11-13 22:12 |
| Algorithm for finding arbitrary length prime numbers | mikenickaloff | Miscellaneous Math | 3 | 2018-08-30 18:12 |
| Help with FFT length | Gradient | Software | 3 | 2013-12-16 01:53 |
| FFT Length | Samoflan | Information & Answers | 8 | 2010-02-16 22:05 |
| FFt length | mack | Information & Answers | 1 | 2009-09-06 03:24 |