Yeah, I've just solved 701 Problems on Brilliant . I did notice a special property of the number 701.
The special property of the number 701 is that it is a prime number and when reversed that is 107 is also a prime number. There are many such numbers like 701 which is a prime number and when reversed is also a prime number.
I wanted to share the special property with you and so to enjoy the moment, I've come up with the following problem:
Find the sum of all the prime numbers less than 1000 with the property that when its digits are reversed, it is also a prime number.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
This list is made up of emirps and palindromic primes . It's interesting that, if we continue on, there are no palindromic primes with an even number of digits, (except 11). This is because any palindrome with an even number of digits will be divisible by 11 by the alternating digit rule, and thus cannot be prime, (except 11).
I doubt there's a mathematical way to do this, right?
Log in to reply
I tend to agree. I think this problem is better-suited for the Computer Science section.
@Nashita Rahman Do you think it would be more suitable to tag this as a Computer Science problem? The only way I could solve it was to go through a list of primes, checking for emirps and then adding them up, which would be more efficiently done by writing a program.
Log in to reply
Even I was thinking about this before but it can't be moved to computer science because the Problem is rated as level 4 in number theory. So it's not possible , I mean the topic can't be edited anymore as there is now no option for that.
Log in to reply
@Nashita Rahman – Oh, ok, I didn't know that it wasn't possible for you to make the change at this point. As a moderator, though, I can make the change, so if you would like me to do that just let me know.
Log in to reply
@Brian Charlesworth – Yes Sir I think it will be better if it's under computer science because may be the number of solvers might increase. Thank You.
And sir check out this one . I think this one can be solved using logic as well a computer program. There's a mathematical way to do this one so I've kept it under logic. Is it fine under logic ? Actually confused !
Log in to reply
@Nashita Rahman – Yes, I think this one is fine under Logic, but I'm a bit confused about what you mean by "the maximum dates of this kind". I would consider 9.11.99 and 11.9.99 to be the "maximum",at least as far as the year is concerned, so I tried 1999, as this is in the 20th century, and then 2099 in case you meant the 21st century, but both were considered incorrect. How should I interpret "the maximum dates of this kind"?
Log in to reply
@Brian Charlesworth – You interpreted the question wrong.The question is basically asking to find the year which contains maximum number of such dates and not the maximum year which has these dates. The year 99 has 2 such dates only , there are years in the 20th century which has more than two such dates. I hope it is clear now!
@Brian Charlesworth – I think this line-"maximum dates of this kind " was confusing for you so I have changed it to "maximum number of dates of this kind". I think there's no more confusion with the question.
Log in to reply
@Nashita Rahman – Ah, I understand now. This is tricky. I first found two years with 7 such dates, but then realized one of them had an invalid date, so there is a unique answer. There is some Number Theory in the question, but the "trick" makes it more suitable as a Logic question.
As I have just one attempt left, I just wanted to double-check on one thing: do we enter the year as 19-- or 20--? You say the 20th century, which would imply 19--, but your added note, where you mention 2012 as an example, would imply entering 20--, which is the 21st century. Nice question, regardless. :)
Log in to reply
@Brian Charlesworth – Oh so sorry ! It's 21st century. So you need to enter 20-- .
Log in to reply
@Nashita Rahman – O.k., great. I got it right on my third attempt. :)
Log in to reply
@Brian Charlesworth – There is a debate going on here. Your answer to this question was 3/8 which is correct but now that answer is wrong so here it is !!
Log in to reply
@Nashita Rahman – This is interesting. I used Bayes' Theorem and got 3/8, (again). But I then looked at it as a Logic question and interpreted it this way: whatever the man says, about anything, 3 out of 4 times, i.e., with a probability of 0.75, he is telling the truth. So if he reports that the throw is a 6, then there is a 0.75 probability that the throw is indeed a 6. I'm not quite sure yet why this approach yields a different answer than the Bayes' Theorem approach, but because of this different interpretation I can't say that 0.75 is wrong.
Edit: O.k., I've read the discussion threads now and I do find Calvin's arguments convincing. I'm prepared to concede now that the answer is indeed 0.75. In the sense that it produced an interesting debate, it turned out to be a great question.
Log in to reply
@Brian Charlesworth – So please join the debate as I am really confused !!! Totally confused...
Python, in functional style:
from math import ceil, sqrt
def isprime(n):
return []==filter(lambda x: n%x==0, range(2,int(sqrt(n)+1)))
def special(n):
return isprime(n) and isprime(int(''.join(reversed(str(n)))))
print sum(filter(special, range(2,1000)))
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
Nice solution , I too used python to solve this . But I didn't know latex so I couldn't upload my solution .
Log in to reply
You don't need LaTeX to display code blocks. Brilliant allows us to display code blocks in the following way:
```<language name (in small letters)>
<one empty line>
<your code goes here>
<another empty line>
```
For example, if you want to display a code written in Python, do the following:
```python
print("Now Nashita knows how to display code blocks in solutions.")
```
It'll be shown up as:
1 |
|
Log in to reply
Ohh I see , thank you so much for helping me out !!!
Problem Loading...
Note Loading...
Set Loading...
The numbers are 2,3,5,7,11,13,17,31,37,71,73,79,97,101,107,113,131,149,151,157,167,179 ,181,191,199,311,313,337,347,353,359,373,383,389,701,709,727,733,739,743,751,757 ,761,769,787,797,907,919,929,937,941,953,967,971,983,991
Their Sum =23909