[math-fun] MMA free on Raspberry Pi
Just saw this, which I don't think has been mentioned here before: The Wolfram Language and Mathematica on Raspberry Pi, for free http://www.raspberrypi.org/archives/5282 -- Tom Duff. Could you guys be any cooler?
Here's a question a friend and I have been looking at very casually, with only the partialest results: Given two bases B and C, what is the asymptotic fraction of positive integers that are palindromes when expressed to each base? Perhaps to make things simpler, assume that B and C are relatively prime. Or are each prime. In fact, just for definiteness, what is the expected number of integers between 1 and N that are palindromes both to base 2 and to base 3 ??? --Dan
Dan Asimov: "what is the expected number of integers between 1 and N that are palindromes both to base 2 and to base 3 ?" I don't know about 'expected number' but https://oeis.org/A060792 gives only 7 < 2^75.
Thanks for the pointer to OEIS, Hans, and thanks to Neil for enabling it! OK, my most recent estimate of the number of dual palindromes -- assuming the two number bases are in a sense "independent" as I'd expect 2 and 3 to be -- is that the total number is probably *finite*. So, QUESTION: Is the number of dual palindromes to bases 2 and 3 finite? ------ What about to any two different prime number bases? --Dan On 2013-11-21, at 2:44 PM, Dan Asimov wrote:
Here's a question a friend and I have been looking at very casually, with only the partialest results:
Given two bases B and C, what is the asymptotic fraction of positive integers that are palindromes when expressed to each base?
Perhaps to make things simpler, assume that B and C are relatively prime.
Or are each prime.
In fact, just for definiteness, what is the expected number of integers between 1 and N that are palindromes both to base 2 and to base 3 ???
--Dan _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
My naive guess was that about sqrt(N) numbers less than N are palindromes to base B; If N = B^K, then there are roughly N^(K/2) palindromes, because once we specify the first half of the digits, the other half are determined. And B^(K/2) = sqrt(B^K). So the probability that a number < N is palindromic in base B is roughly 1/sqrt(N). So if they behave like independent events, the chance that a number < N is palindromic in 2 bases is roughly 1/N, suggesting there will be roughly one such number, regardless of N. So I would also guess that there are finitely many numbers palindromic in any 2 fixed relatively-prime bases, but I have no idea how to prove this. Andy On Thu, Nov 21, 2013 at 8:13 PM, Dan Asimov <dasimov@earthlink.net> wrote:
Thanks for the pointer to OEIS, Hans, and thanks to Neil for enabling it!
OK, my most recent estimate of the number of dual palindromes -- assuming the two number bases are in a sense "independent" as I'd expect 2 and 3 to be -- is that the total number is probably *finite*.
So, QUESTION: Is the number of dual palindromes to bases 2 and 3 finite? ------ What about to any two different prime number bases?
--Dan
On 2013-11-21, at 2:44 PM, Dan Asimov wrote:
Here's a question a friend and I have been looking at very casually, with only the partialest results:
Given two bases B and C, what is the asymptotic fraction of positive integers that are palindromes when expressed to each base?
Perhaps to make things simpler, assume that B and C are relatively prime.
Or are each prime.
In fact, just for definiteness, what is the expected number of integers between 1 and N that are palindromes both to base 2 and to base 3 ???
--Dan _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- Andy.Latto@pobox.com
Yep, that's roughly the same argument I used, but with a bit more care, to get a fraction of ~ 4/N numbers that are palindromes to both bases B and C. Which is why I thought the total number of dual palindromes may be finite, especially if gcd(B,C) = 1. --Dan On 2013-11-21, at 11:25 PM, Andy Latto wrote:
My naive guess was that about sqrt(N) numbers less than N are palindromes to base B; If N = B^K, then there are roughly N^(K/2) palindromes, because once we specify the first half of the digits, the other half are determined. And B^(K/2) = sqrt(B^K). So the probability that a number < N is palindromic in base B is roughly 1/sqrt(N). So if they behave like independent events, the chance that a number < N is palindromic in 2 bases is roughly 1/N, suggesting there will be roughly one such number, regardless of N.
So I would also guess that there are finitely many numbers palindromic in any 2 fixed relatively-prime bases, but I have no idea how to prove this.
Andy
Maybe I'm missing something, but your argument shows that given a random base-2 palindrome between 2^N and 2^(N+1)-1 there is some N-independent probability (in the limit of large N) that this number is also a base-3 palindrome. In other words, the number of dual palindromes is not finite, but has uniform density on a logarithmic scale. -Veit On Nov 22, 2013, at 11:05 AM, Dan Asimov <dasimov@earthlink.net> wrote:
Yep, that's roughly the same argument I used, but with a bit more care, to get a fraction of ~ 4/N numbers that are palindromes to both bases B and C.
Which is why I thought the total number of dual palindromes may be finite, especially if gcd(B,C) = 1.
--Dan
On 2013-11-21, at 11:25 PM, Andy Latto wrote:
My naive guess was that about sqrt(N) numbers less than N are palindromes to base B; If N = B^K, then there are roughly N^(K/2) palindromes, because once we specify the first half of the digits, the other half are determined. And B^(K/2) = sqrt(B^K). So the probability that a number < N is palindromic in base B is roughly 1/sqrt(N). So if they behave like independent events, the chance that a number < N is palindromic in 2 bases is roughly 1/N, suggesting there will be roughly one such number, regardless of N.
So I would also guess that there are finitely many numbers palindromic in any 2 fixed relatively-prime bases, but I have no idea how to prove this.
Andy
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
On Fri, Nov 22, 2013 at 11:40 AM, Veit Elser <ve10@cornell.edu> wrote:
Maybe I'm missing something, but your argument shows that given a random base-2 palindrome between 2^N and 2^(N+1)-1 there is some N-independent probability (in the limit of large N) that this number is also a base-3 palindrome.
No, the probability is approximate 1/(sqrt N) (from my estimates) or 2/(sqrt N) (Dan's more careful estimates) that a number between 2^N and 2^N+1 - 1 is a base-3 palindrome, and this value is not N-independent. Andy
In other words, the number of dual palindromes is not finite, but has uniform density on a logarithmic scale.
-Veit
On Nov 22, 2013, at 11:05 AM, Dan Asimov <dasimov@earthlink.net> wrote:
Yep, that's roughly the same argument I used, but with a bit more care, to get a fraction of ~ 4/N numbers that are palindromes to both bases B and C.
Which is why I thought the total number of dual palindromes may be finite, especially if gcd(B,C) = 1.
--Dan
On 2013-11-21, at 11:25 PM, Andy Latto wrote:
My naive guess was that about sqrt(N) numbers less than N are palindromes to base B; If N = B^K, then there are roughly N^(K/2) palindromes, because once we specify the first half of the digits, the other half are determined. And B^(K/2) = sqrt(B^K). So the probability that a number < N is palindromic in base B is roughly 1/sqrt(N). So if they behave like independent events, the chance that a number < N is palindromic in 2 bases is roughly 1/N, suggesting there will be roughly one such number, regardless of N.
So I would also guess that there are finitely many numbers palindromic in any 2 fixed relatively-prime bases, but I have no idea how to prove this.
Andy
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- Andy.Latto@pobox.com
Poor wording on my part. There are sqrt(N) base-2 palindromes and the probability any one of them is a base-3 palindrome is 1/sqrt(N), so the expected number of dual palindromes is order 1. But that applies for every N. -Veit On Nov 22, 2013, at 2:30 PM, Andy Latto <andy.latto@pobox.com> wrote:
Maybe I'm missing something, but your argument shows that given a random base-2 palindrome between 2^N and 2^(N+1)-1 there is some N-independent probability (in the limit of large N) that this number is also a base-3 palindrome.
No, the probability is approximate 1/(sqrt N) (from my estimates) or 2/(sqrt N) (Dan's more careful estimates) that a number between 2^N and 2^N+1 - 1 is a base-3 palindrome, and this value is not N-independent.
Andy
Actually, the estimate I mentioned is for the number of base-B palindromes from 1 to B^(2r), I get 2 (B-1) B^r - 2. (Which comes by summing the number having a fixed length, from 1 to 2r-1.) --Dan On 2013-11-22, at 11:30 AM, Andy Latto wrote:
On Fri, Nov 22, 2013 at 11:40 AM, Veit Elser <ve10@cornell.edu> wrote:
Maybe I'm missing something, but your argument shows that given a random base-2 palindrome between 2^N and 2^(N+1)-1 there is some N-independent probability (in the limit of large N) that this number is also a base-3 palindrome.
No, the probability is approximate 1/(sqrt N) (from my estimates) or 2/(sqrt N) (Dan's more careful estimates) that a number between 2^N and 2^N+1 - 1 is a base-3 palindrome, and this value is not N-independent.
Andy
In other words, the number of dual palindromes is not finite, but has uniform density on a logarithmic scale.
-Veit
On Nov 22, 2013, at 11:05 AM, Dan Asimov <dasimov@earthlink.net> wrote:
Yep, that's roughly the same argument I used, but with a bit more care, to get a fraction of ~ 4/N numbers that are palindromes to both bases B and C.
Which is why I thought the total number of dual palindromes may be finite, especially if gcd(B,C) = 1.
--Dan
On 2013-11-21, at 11:25 PM, Andy Latto wrote:
My naive guess was that about sqrt(N) numbers less than N are palindromes to base B; If N = B^K, then there are roughly N^(K/2) palindromes, because once we specify the first half of the digits, the other half are determined. And B^(K/2) = sqrt(B^K). So the probability that a number < N is palindromic in base B is roughly 1/sqrt(N). So if they behave like independent events, the chance that a number < N is palindromic in 2 bases is roughly 1/N, suggesting there will be roughly one such number, regardless of N.
So I would also guess that there are finitely many numbers palindromic in any 2 fixed relatively-prime bases, but I have no idea how to prove this.
Andy
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- Andy.Latto@pobox.com _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
In view of the contradictory arguments we've seen, would someone PLEASE add the definitive answer to A060792 ? "The following heuristic argument shows that there are almost certainly onlyfinitely/infinitely many terms in this sequence ..." Thanks! Neil On Fri, Nov 22, 2013 at 4:22 PM, Dan Asimov <dasimov@earthlink.net> wrote:
Actually, the estimate I mentioned is for the number of base-B palindromes from 1 to B^(2r), I get
2 (B-1) B^r - 2.
(Which comes by summing the number having a fixed length, from 1 to 2r-1.)
--Dan
On 2013-11-22, at 11:30 AM, Andy Latto wrote:
On Fri, Nov 22, 2013 at 11:40 AM, Veit Elser <ve10@cornell.edu> wrote:
Maybe I'm missing something, but your argument shows that given a random base-2 palindrome between 2^N and 2^(N+1)-1 there is some N-independent probability (in the limit of large N) that this number is also a base-3 palindrome.
No, the probability is approximate 1/(sqrt N) (from my estimates) or 2/(sqrt N) (Dan's more careful estimates) that a number between 2^N and 2^N+1 - 1 is a base-3 palindrome, and this value is not N-independent.
Andy
In other words, the number of dual palindromes is not finite, but has uniform density on a logarithmic scale.
-Veit
On Nov 22, 2013, at 11:05 AM, Dan Asimov <dasimov@earthlink.net> wrote:
Yep, that's roughly the same argument I used, but with a bit more care, to get a fraction of ~ 4/N numbers that are palindromes to both bases B and C.
Which is why I thought the total number of dual palindromes may be finite, especially if gcd(B,C) = 1.
--Dan
On 2013-11-21, at 11:25 PM, Andy Latto wrote:
My naive guess was that about sqrt(N) numbers less than N are palindromes to base B; If N = B^K, then there are roughly N^(K/2) palindromes, because once we specify the first half of the digits, the other half are determined. And B^(K/2) = sqrt(B^K). So the probability that a number < N is palindromic in base B is roughly 1/sqrt(N). So if they behave like independent events, the chance that a number < N is palindromic in 2 bases is roughly 1/N, suggesting there will be roughly one such number, regardless of N.
So I would also guess that there are finitely many numbers palindromic in any 2 fixed relatively-prime bases, but I have no idea how to prove this.
Andy
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- Andy.Latto@pobox.com _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- Dear Friends, I have now retired from AT&T. New coordinates: Neil J. A. Sloane, President, OEIS Foundation 11 South Adelaide Avenue, Highland Park, NJ 08904, USA. Also Visiting Scientist, Math. Dept., Rutgers University, Piscataway, NJ. Phone: 732 828 6098; home page: http://NeilSloane.com Email: njasloane@gmail.com
Though, there may not be a straightforward asymptotic expression, since the counts have been made for number 1 to B^k for some k, where B is the number base. Like Benford's law, the fraction probably wobbles back and forth, and it's not clear to me if applying e.g. Cesaro summation or the like would cause it to settle down. --Dan On 2013-11-22, at 1:29 PM, Neil Sloane wrote:
In view of the contradictory arguments we've seen, would someone PLEASE add the definitive answer to A060792 ? "The following heuristic argument shows that there are almost certainly onlyfinitely/infinitely many terms in this sequence ..." Thanks! Neil
participants (6)
-
Andy Latto -
Dan Asimov -
Hans Havermann -
Neil Sloane -
Tom Duff -
Veit Elser