Any positive number can be written as a sum of three palindromes
81–90 of 114 posts
Re: Any positive number can be written as a sum of three palindromes
#82i'm underwhelmed 77777777777777 +0 +0 =77777777777777
Re: Any positive number can be written as a sum of three palindromes
#83For 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
#84Earlier quoted context omitted.
Still a bit boring, feels like cheating, something like 12321 + X + Y would be nice.
55555 = 12321 + 43234 + 0 :) And if you don't like that: 55555 = 12321 + 23132 + 20102 Palindromes are sort of the least surprising numbers to have this property because you can easily "split" them into as many palindromes as you want like this. The surprising result is that you could write something like 19837100018374 as the sum of only 3 palindromes.
Re: Any positive number can be written as a sum of three palindromes
#85Earlier quoted context omitted.
There's a stronger generalization: it's true of any divisor of the base (not just prime divisors and not just proper divisors). For example, it works for divisibility by 6 in base 12, or divisibility by 10 in base 10. (Also, the digital root test, where you add up the digits, works for any divisor that is also a divisor of the base minus 1, so for example hexadecimal has a digital root test for divisibility by 3, 5,…
And the less well known "add and subtract alternative digits" works for dividing by 11, that is, the base plus one, in any base. And for any divisors of 11.
Re: Any positive number can be written as a sum of three palindromes
#86For those who are not impressed when they enter "3" and "444", try something like "8239419503490293592", and prepare to be blown away.
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 instead of substituting; with -c, it takes the compliment set (so everything except what you specify). Basically we're filtering characters or of urandom's output. Finally, we limit the output to a certain number of characters.
Re: Any positive number can be written as a sum of three palindromes
#87If a(n) is the number of ways to write n as the sum of three palindromes, the sequence a(0), a(1), a(2), a(3) is kind of interesting. http://oeis.org/A261132
Re: Any positive number can be written as a sum of three palindromes
#88Earlier quoted context omitted.
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
Not base 2. All palindromes in base 2 have a 1 in the last position, because there's a 1 in the first position. This means that any addition of 3 palindromes must be odd because the result of the addition is guaranteed a 1 in the ones position, meaning even numbers can't possibly be represented that way. This is discussed in the original paper at the bottom of the second page: https://arxiv.org/pdf/1602.06208.pdf , w…
Re: Any positive number can be written as a sum of three palindromes
#89For 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…
It's a cool result.