I've just finished calculating all the 11-digit palindromic primes. (The smaller ones can be downloaded.) By any chance, does anyone have a complete list larger palindromic primes? calculating the 13-digit long ones may take about a day, that's not a big problem, but I'm interested in larger ones too.
Why? Out out curiosity
Thanks anyway.
Hmm... When i came across your post, I thought to myself, "That's interesting". I'm a avid fan of programming and had did quite a few mini applications on my own. However, I had not tried calculating Palindromic Primes before.
So do you simply code the program, let it run on its own for generating the numbers? Just out of curiousity, which programming language did you use for the program?
Did you check if it is a prime number first or do you check if it is palindromic first? Because i'm suspecting that the order will affect the performance of the calculation...
| mk12327 wrote: |
| Did you check if it is a prime number first or do you check if it is palindromic first? Because i'm suspecting that the order will affect the performance of the calculation... |
I should certainly hope that you check they are palindromes first, or even better just ensure they are palindromes by generating them as such. Finding the factors of 13 digits numbers is going to be computationally hard, which is just as well because the fact that factoring large numbers is hard is the basis of public key cryptography.
Finding if any number is prime is easy, and even way back when I did my computing degree (Basic then was the bees knees), just divide by evert integer < Sqroot
| WhistleTurning wrote: |
| Finding if any number is prime is easy, and even way back when I did my computing degree (Basic then was the bees knees), just divide by evert integer < Sqroot |
Easy to program, but quite slow running. To get faster results, you can precalculate a table of primes up to the square root of the largest number you will be testing.
Today, there are many shortcuts based on the idea that most numbers fit into a pattern which proves they are NOT prime. Even many cryptographic applications use these tests and then just assume the number is prime if it can't be proven non-prime. Most of the shortcuts require a lot of programming, though.
Presumably, if you want to know for certain which numbers are prime, you use the shortcuts to eliminate most of the candidates, then try all possible factors on the few that remain.
That's funny, actually, calculating palindromic primes is one of our timed ACM problems in college right now. We had to write a solution in under an hour. Good job on doing since I was never able to solve it.
I guess I'm not as much of a math head as I'd like to be, god knows what I'm doing in BS Computer Science. But I love it, and I love programming, so there.
I wonder how Frihost works too. I mean how do they actually check for correct punctuation and grammar? I know it's supposed to matter, but I don't think that's a built-in vbulletin feature.
| Quote: |
Why? Out out curiosity
|
Well atilao, satisfy your curiosity with other things, ok? There are so many misteries unsolved... but this?? Let it to the lab guys.
| assasssin8 wrote: |
| I wonder how Frihost works too. I mean how do they actually check for correct punctuation and grammar? I know it's supposed to matter, but I don't think that's a built-in vbulletin feature. |
You're new on this forum, aren't you? Look around for a while and you'll find that this topic is one of the few that doesn't have one or two twelve year olds writing liek thiz!!!1!!!cos(0)!11! Of course not all topics are as bad as this one (click).
By the way, Frihost uses a modified version of phpBB2, not vBulletin. It doesn't contain a spell checker.
On-topic: what's the use of the palindromic character of these numbers apart from providing a beginner's programming challenge? I mean, prime numbers have obvious applications, but palindromic numbers?
Well, what's the catch with calculating palindromic primes? You generate palindromes, then check whether they're prime, there's no faster algorithm, so what's the task on ACM? That's great, you're a humble computer science student, but I don't get your post at all.
There are some algorithms based on statistical analysis to reduce chances a number is prime, but if it doesn't work you have to check it anyway. In fact there are many algorithms (some are very sophisticated) for primarity testing, and I don't think any of them could do any good here (using the fact that checked numbers are palindromes), though I know a few.
I did this for an advanced programming class. We programmed this prime number generator on C#, and employed 4 background workers (threads). If you want to find 13 digit palindromeic primes, best get on a computer with a quad core--and it shouldn't take the whole day to get to 13 digits..maybe half a day lol.