Any positive number can be written as a sum of three palindromes
91–100 of 114 posts
Re: Any positive number can be written as a sum of three palindromes
#92For those who are not impressed when they enter "3" and "444", try something like "8239419503490293592", and prepare to be blown away.
Re: Any positive number can be written as a sum of three palindromes
#93Wonderful wonderful website. What happends to quirky people like this when they leave university and enter the industry?
Newcastle University: I'm e-learning officer in the School of Mathematics and Statistics.
Most of my job involves writing the maths e-assessment system, Numbas. https://www.numbas.org.uk/
Re: Any positive number can be written as a sum of three palindromes
#94Could this trick be used to improve compression? Since palindromes contain repeated digits by definition, perhaps they are more compressible than the original number? Of course, you'd have three numbers to compress instead of one...
If the number itself happens to be a palindrome, you can get down to 50%, but that's completely unrelated to this trick.
In general, it's impossible for a compression algorithm to losslessly compress all numbers to a shorter representation, it can only make some numbers shorter and others longer. (Pigeonhole principle: there are not enough short codes, so if you assign a shorter code to all numbers, some will get the same code, making the compression not lossless.)
Practical uses of compression are all about reducing the average length given a nonuniform probability distribution, so a palindrome-based compression scheme would only be useful if you could expect most numbers you're dealing with to be palindromes.
Re: Any positive number can be written as a sum of three palindromes
#95For those wondering, this works in every base ≥ 5, according to the original paper: https://arxiv.org/abs/1602.06208v2 Every time I see something like this that is dependent on base-10 representation, I'm always curious to know whether it generalizes, or if it's a quirk specific to base-10 representation. For example, being able to tell if a number is divisible by 2 or 5 by only looking at the last digit.
Yeah, for example to check if a number is divisible by 3, we can use the digit sum and check if the result is divisible by 3, e.g. 153=(1)+(5)+(3)=9. This works in base-10, but we can generalize this by converting the dividend X into (3* X+1)-base then doing a digit sum. Let's say we want to check whether 238 is divisible by 17, so our base is 3* 17+1=52, 238 in base-52 is (4)+(30)=34=2* 17. If the convert-to-arbitra…
Re: Any positive number can be written as a sum of three palindromes
#96in all seriousness it is always amazing to see simple theorems rely on such complex proofs
Re: Any positive number can be written as a sum of three palindromes
#97For those who are not impressed when they enter "3" and "444", try something like "8239419503490293592", and prepare to be blown away.
I figured it had small cases down so I immediately went for a fifteen digit number from /dev/urandom and was happy that it solved it perfectly. But I'm probably the exception. For those wondering how to generate random numbers, it's simple if you don't care about a little computational overhead: To explain the command: we read urandom into tr's stdin; tr translates (like "echo haha | tr a u"); with -d, tr deletes ins…
LC_CTYPE=C </dev/urandom tr -dc 0-9 | head -c 15
Re: Any positive number can be written as a sum of three palindromes
#98For those wondering, this works in every base ≥ 5, according to the original paper: https://arxiv.org/abs/1602.06208v2 Every time I see something like this that is dependent on base-10 representation, I'm always curious to know whether it generalizes, or if it's a quirk specific to base-10 representation. For example, being able to tell if a number is divisible by 2 or 5 by only looking at the last digit.
And according to the Numberphile video ( https://www.youtube.com/watch?v=OKhacWQ2fCs ) there is a prior paper showing it for bases 2, 3, and 4
Re: Any positive number can be written as a sum of three palindromes
#99Re: Any positive number can be written as a sum of three palindromes
#100I entered 55555 which gave the underwhelming result of 55555+0+0 :/