We call a positive integer curious if it is impossible to convert the integer to a prime number by replacing one of its digits with another digit.
What is the smallest curious number ?
You may refer to this list of primes .
Bonus : Find all curious numbers.
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.
Hmmmm , it is not necessary to consider the numbers by separate cases. Your last observation that in the first 200 positive numbers there is a prime number in any 10 consecutive numbers is enough for checking all the cases from 0 to 200 and therefore for solving the problem and also it is less ambiguous as a demonstration for the 2 digit numbers but cute solution anyways.
Log in to reply
The thing is that given the number 12, instead of replacing the units digit because of my argument, we can replace the tens digit with 0, and then the outcome is 2 which is prime.
Log in to reply
Oh , I missed that. Yet anyways , your last argument still works for all numbers including the numbers made from 2 digits. Taking any number from the the numbers from 1 to 200 they will become one of the prime numbers until 200 and that because for this digits there will be at least anyways one prime in 10 digits and therefore for any 10 consecutive numbers they can be transformed in one of the primes which are in set of the 10 consecutive numbers included. As list 2, 11, 23, 31, 41, 53, 61, 71, 83, 97, 101, 113, 127, 131, 149, 151, 163, 173, 181, 191 are all the prime numbers and therefore any number of a number of digits until 200 can be by replacing a digit in anyways at least one way transformed in a prime number. Looking at the list of primes simplified this because it clarifies the argument.
For the bonus part , there is not necessary to know the distribution of primes to tell if the number is or not a curious number. What you have to know is whether or not by replacing any digit of that number the number is divisible with some other number or not. Of course , this doesn't tell what are all curious numbers because for that you should find a form by which it is guaranteed that however you change one digit they will divisible with some numbers which requires understanding prime factorization in a general way I think. Observe however that one such form for which by any way you change the digits the numbers will be curious is 200+2310n. This actually helps in finding all curious numbers whose prime factorization is bounded by all primes until 11. And that because for replacing any digit before the last one you will get an even number as the number of the form 200+2310n ends in 0 and for replacing the last number with an odd digit you will get things which are divisible with 3 , 7 , 11. That is replacing the number with 3 the number becomes divisible with 7 , for replacing with 7 with 3 and for replacing with 9 divisible with 11. For numbers which can be curious but divisible with more than 11 there might be other forms anyway.
Log in to reply
@A A – Read the last paragraph of my solution.
Log in to reply
@Mateo Matijasevick – Oh , right!
@Mateo Matijasevick – Yet the numbers of the form 200+ 2310 * n helps you also find some without the restriction of numbers having no prime number in the first 19 numbers.
Btw , the list is not provided by the problem author! It's provided I think by Pi Han Goh who anyways also offered without any kind of asking to improve the "unclear" formulation of the problem. Oh , and you don't have to put the reader to such much work. You can provide that list of primes and by this make the reader see it for himself. Oh , and for the bonus. What form do this curious numbers have ?
Why not 10
if we replace '0' with 1 then it will become 11 which is a prime number
Log in to reply
"This claim has a little case to regard: the considered number is a two digit number (left to the reader)."
The answer obviously can't be a single digit integer, because we can just replace the digit by 3, 5 or 7 and it will become a prime number.
If the answer is a 2-digit integer, then we must find an integer 1 ≤ n ≤ 9 such that all the numbers 1 0 n , 1 0 n + 1 , 1 0 n + 2 , … , 1 0 n + 9 are composite numbers. But looking at the list tells us that there isn't any 10 consecutive 2-digit composite number. So it can't be a 2-digit integer as well.
Now suppose the answer is in the interval [ 1 0 0 , 1 9 9 ] , then we must find an integer 0 ≤ p ≤ 9 such that at least one of both the cases below is fulfilled:
Case 1 : All the numbers 1 1 0 + p , 1 2 0 + p , 1 3 0 + p , … , 1 9 0 + p are composite numbers.
Case 2 : All 1 0 1 + 1 0 p , 1 0 3 + 1 0 p , 1 0 7 + 1 0 p , 1 0 9 + 1 0 p are composite numbers.
Looking at the list shows us that it is impossible. So the answer cannot fall in the interval [ 1 0 0 , 1 9 9 ] .
Now we just need to show that 200 is the smallest answer. A necessary condition for it to be a prime number is for its last digit to be an odd number. So the only way for us to prove that 200 is a curious number is to show that 201, 203, 205, 207 and 209 are composite numbers, which can be verified by looking at the list of primes. And we're done.
The part with the cases checking from 100 to 199 inclusive is a little bit forced but it's cute and original anyway at least.
But you made a mistake in the paragraph upper to presenting those cases , I think you mean both cases are fulfilled not "at least both is" fulfilled as you wrote but cute solution anyway.
Log in to reply
Thank you. You post great Logic problems! I'm currently writing up a solution for your question here and I'm trying to find the best way to present it.
I hope you keep posting more questions. I really enjoyed them!
Log in to reply
Are you making advertisement for my problems ? Thanks for that but anyway there are a lot of great problems here , yours are great anyway too.
And I'm glad you enjoyed them after knowing you are upset on my style of writing. For that problem putted there (and which made you very upset because I undone your edits) I would just advice to try solve it not by just checking cases and consider more than just one condition but anyway it is great you enjoy my problems and are not very upset on me anyway.
Log in to reply
@A A – I won't get personal with anyone here unless they deliberately trying to sabotage me. I don't see any ill-intent from you so you're fine by me.
Log in to reply
@Pi Han Goh – Though in this epoch false connections with people , especially on internet so to say , meaning exterior relations and nothing internally that drives people together are everywhere I would hope one day you will let formalism in your relations (especially in the real world with at least some people) apart and start having authentic relations and not just superficial ones.
That's why I wouldn't mind if you will get upset on me , especially since indeed I really have any kind of mean intent but you will see that hopefully later , because it would mean you don't involve in just being exteriorly connecting and having nothing in common with anyone but exchanging some two words from day to day therefore living completely empty and in poverty anyway.
But I'm done with my advice and talking today anyway.
Oh , and I forgot to tell (besides telling you haven't corrected me when I corrected you at this question) that I will post some logic problems later I think anyway.
Log in to reply
@A A – You're using complicated words and your LONG sentences do not make sense.
Log in to reply
@Pi Han Goh – Haha , but they really do. Ok , I said that I hope and actually advise you to not live having just relations with people where you do not feel any kind of real connection.
That is just relations where you feel you have nothing in common with the people around (as they are everywhere in this epoch) and just speak with them and do stuff with them just because you have to socialize with someone , meaning that you feel you have nothing in common but still speak with them. That is , you feel you have "exterior relations" and not relations which anyway are made with people because you feel some kind of closeness therefore something you have in common with them which would keep not make you a superficial isolated person meaning by that one that is feeling distant in things which matters and close in unimportant things with others.
Problem Loading...
Note Loading...
Set Loading...
Note that if the units digit of a number is 0 , 2 , 4 , 5 , 6 or 8 , then the number is divisible by 2 or 5 , and hence, it's not prime. Thus, if we consider a number as described previously, we will have to replace its units digit in order to convert it to a prime number, because if we replace another digit, the number will still be divisible by 2 or 5 . This claim has a little case to regard: the considered number is a two digit number (left to the reader).
Note that if the number is divisible by another distinct integer, its divisibility is not related to the last digit but to other criterias, so it might be possible to convert it to a prime number by replacing one of its digits.
In the first 200 positive numbers, there's a prime number in each list of ten consecutive numbers that begins with a number ending with 0, hence, given a composite number, there's a prime number which only differs of the composite one by the units digit, so the composite number is not curious (the task of proving the same when given a prime number is left to the reader).
Therefore, we're looking for the first ten consecutive integers among in which there's no prime number. Looking at the list provided by the problem author, we can find that this happens, for the first time, between 199 and 211. Thus, given the number 200, it is not possible to convert it to a prime number by replacing a single digit.
Bonus: As there are infinite lists of 19 consecutive composite positive integers, there are infinite curious numbers. (19 because we need to guarantee that there's a list of 10 consecutive composite integers in which the first one ends with 0).
As an explicit form of this curious numbers, let n > 1 8 be an integer. Consider the list formed by ( n + 1 ) ! + 2 , ( n + 1 ) ! + 3 . . . ( n + 1 ) ! + ( n + 1 ) , that consists of 19 composite numbers. Among them, those that ends in 0 , 2 , 4 , 5 , 6 or 8 , are curious numbers. Of course, there are a lot more of curious numbers, but I think there's no way to find their generalized form as we don't have a generalized distribution of primes numbers.