Live data from Hacker News

Any positive number can be written as a sum of three palindromes

somethingorotherwhatever.com

101–110 of 114 posts

Re: Any positive number can be written as a sum of three palindromes

#101

Earlier quoted context omitted.

> Is there such a thing as "interactive nonfiction"? The real physical Universe is interactive nonfiction.

The real physical universe doesn't offer tooling for playing with advanced math, though.

> The real physical universe doesn't offer tooling for playing with advanced math, though.

The real physical universe is nothing but tooling for playing with advanced math (but it's not always easy to figure out what the advanced math is, or how best to play with it).

Re: Any positive number can be written as a sum of three palindromes

#102
post #34

If 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

> If 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.

Do you just mean "the sequence a(n)"? I don't see anything especially interesting about the first 4 terms.

Re: Any positive number can be written as a sum of three palindromes

#103
post #61

Earlier quoted context omitted.

OK tough guy, please give me three palindromic numbers that add up to 1,234,567. And don't use the trick! And don't use brute force!

1,234,567 + 0 + 0 = 1,234,567

> > OK tough guy, please give me three palindromic numbers that add up to 1,234,567. And don't use the trick! And don't use brute force!

> 1,234,567 + 0 + 0 = 1,234,567

The first of these is not a palindrome.

Re: Any positive number can be written as a sum of three palindromes

#104
post #51

It seems to go for the "least interesting" result. eg: I gave it 363 and it gave me back 363 + 0 + 0, which while technically true, 121 + 121 + 121 would have been more in the spirit of it, IMO. Or even 242 + 121 + 0 would be a little easier than just reusing the original palindrome number with zeros.

It's handy that the "empty sum " (zero) happens to be a palindrome, so it can just work to fill any number of empty slots.

Re: Any positive number can be written as a sum of three palindromes

#105
post #101

Earlier quoted context omitted.

The real physical universe doesn't offer tooling for playing with advanced math, though.

> The real physical universe doesn't offer tooling for playing with advanced math, though. The real physical universe is nothing but tooling for playing with advanced math (but it's not always easy to figure out what the advanced math is, or how best to play with it).

IMHO that's like saying higher level programming languages than assembly are unnecessary. Or that a debugger is useless.

And not just the learning purposes. Imagine the possibilities if we could properly simulate (and speed up the simulation) the world - what if we could use genetic algorithms to develop an organism.

Re: Any positive number can be written as a sum of three palindromes

#106
post #101

Earlier quoted context omitted.

> The real physical universe doesn't offer tooling for playing with advanced math, though. The real physical universe is nothing but tooling for playing with advanced math (but it's not always easy to figure out what the advanced math is, or how best to play with it).

IMHO that's like saying higher level programming languages than assembly are unnecessary. Or that a debugger is useless. And not just the learning purposes. Imagine the possibilities if we could properly simulate (and speed up the simulation) the world - what if we could use genetic algorithms to develop an organism.

https://qntm.org/responsibility

Re: Any positive number can be written as a sum of three palindromes

#107
post #101

Earlier quoted context omitted.

> The real physical universe doesn't offer tooling for playing with advanced math, though. The real physical universe is nothing but tooling for playing with advanced math (but it's not always easy to figure out what the advanced math is, or how best to play with it).

IMHO that's like saying higher level programming languages than assembly are unnecessary. Or that a debugger is useless. And not just the learning purposes. Imagine the possibilities if we could properly simulate (and speed up the simulation) the world - what if we could use genetic algorithms to develop an organism.

> IMHO that's like saying higher level programming languages than assembly are unnecessary. Or that a debugger is useless.

These two statements are quite different. Higher level programming languages than assembly are unnecessary; anything beyond the lambda calculus is unnecessary (assuming our goal is to compute Turing computable things). That's very different from saying that they're useless; just because they can be done without doesn't mean that they should.

Re: Any positive number can be written as a sum of three palindromes

#108
post #102
post #34

If 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

> If 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. Do you just mean "the sequence a(n)"? I don't see anything especially interesting about the first 4 terms.

Yeah, a ", ..." got left out.

Re: Any positive number can be written as a sum of three palindromes

#110

For 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…

Is it unreasonable to think that some operations might be cheaper to compute by the converting the base and applying these types of tests?
Post reply on HN