Palindrome primes

How many positive integers n n less than 10000 satisfy all of the following 3 properties:

A) n n is prime.
B) n n is a palindrome.
C) n n has an even number of digits.

Details and assumptions

A palindrome number is an integer that is the same when its digits are reversed. As an explicit example, 232 232 is a palindrome.


The answer is 1.

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.

11 solutions

A7 Jack
May 20, 2014

In question,it is given that n consists of even number of digits. Recall the test for number divisible by 11. Since sum of numbers of even places-sum of numbers in odd places = 0 is a multiple of 11, so all such numbers are divisible by 11.

So the only satisfying prime is thus n=11 Ans=1

Most solutions chose to show divisibility by 11 through a b b a = 11 ( 91 a + 10 b ) abba = 11 ( 91 a + 10 b ) . This approach shows you how to deal with all positive integers, i.e. without the restriction that n 10000 n \leq 10000 .

Calvin Lin Staff - 7 years ago
Jc Ng
May 20, 2014

There are three conditions that the integer n has to fulfill. A) n is prime. B) n is a palindrome. C) n has an even number of digits.

Let us take a 4-digit palindrome, abcd, which satisfies B) and C)

abcd = dcba, so abcd = abba

abba = 1000a+ 100b + 10b + a

abba = 1001a + 101b

abba = 11(91a+10b)

Therefore, we can see that all 4-digit palindromes are divisible by 11, and that means that they are not prime. This is true for all other palindromes with an even number of digits, and that can be proven with the same method as above. However, there is one exception.

And that is of course, 11 itself, because being divisible by itself does not make it non-prime.

Therefore, because all palindromes with an even number of digits are divisible by 11 and are thus prime (except 11), we can conclude that the only palindrome with an even number of digits and which is a prime is 11.

It is given that n has even number of digits . So n has either 2 digits or 4 digits . First counting for 2 digit prime - palindrome numbers . Let the number be 10 a + b . Since it is palindrome so both the digits will be the same . Hence the number can be written as 10 a + a = 11 a . Hence supposing a = 1 will only satisfy the equation . That is only 11 is prime and palindrome 2 digit number .As all other numbers such as 22 , 33 , 44, 55, 66, 77, 88, 99 can be expressed as a product of 2 positive numbers other than 1. Hence they will not be prime . Now , counting for numbers with 4 digits . Say that the number is 1000 a+ 100 b + 10 c + d . Since it is a palindrome a = d and b = c . Hence the equation can be 1000 a + 100 b + 10 b + d = 1001 *a + 101 b.

Now 1001 a + 101 b = 13 (91 a + 7*b) . Since a and b are positive integers all the 4-digit palindrome numbers can be expressed as product of 2 different positive integers (other than 1) . Hence there will be no 4 -digit palindrome number which is prime also . Therefore , we have only 1 solution to the above question that is 11. Hence , there is only 1 integer which satisfies all of the above properties . Hence , the answer is 1

Cuong Doan
May 20, 2014

Since n has an even number of digits, n can only has 2 digits or 4 digits.

  • If n has 2 digits, because n is a palindrome, it must be divisible by 11. And since n is a prime number, n can only be 11.

  • If n has 4 digits, because n is a palindrome, n can be written as a b b a \overline{abba} where a is a positive integer less than 10 and b is a non-negative integer less than 10.

n = a b b a = 1001 a + 110 b n = \overline{abba} = 1001*a + 110*b

1001 0 ( m o d 11 ) 1001 \equiv 0 \pmod{11} and 110 0 ( m o d 11 ) 110 \equiv 0 \pmod{11}

n 0 ( m o d 11 ) \Rightarrow n \equiv0 \pmod{11}

Then, n can not be a prime number

So, the answer is 1

The possible numbers must be only 2-digit numbers aa or 4-digit numbers abba . Since the 2-digit numbers are the multiples of 11, so from the 2-digit numbers we only get 1 number that's 11

From the 4-digit numbers since n is prime so it can only start and end with odd numbers 1, 3, 5, 7, 9 Starts from 1001, 3003, 5005, 7007, 9009 and regularly it increases by 110 until 1991 and so on. Since 1001 is the multiple of 11 and it increases by a multiple of 11 so there's no 4-digit number which satisfies all of the properties.

Thus, the possible number of n is 1 that is 11

Ching Z
May 20, 2014

The third condition states that n should have an even number of digit. Therefore we are restricted to 2-digit and 4-digit integers only. The first 2-digit palindromic integer is 11; followed by 22, 33, 44, 55, 66, 77, 88, and 99. It is easy to see that among all of these 2-digit palindromes, only 11 is prime. All others are just multiples of 11.

Our concern now are the 4-digit palindromic integers. Notice that we can write these integers in the form AAAA or ABBA.

(ex. 8888, 1221)

There are 90 such 4-digit integers. We can go through all of those numbers and test if they are prime or not or we could just use something we already know.

Let us recall the divisibility test for 11.

A number is divisible by 11 if the difference of the sum of the digits in odd places and the sum of the digits in even places is either 11 or zero. For example let us have 2156. This is divisible by 11 because:

(2 + 5) - (1 + 6) = 0

Let us test if the integers in the form AAAA and ABBA are divisible by 11.

AAAA: (A + A) - (A + A) = A + A - A - A = 0

ABBA: (A + B) - (A + B) = A + B - A - B = 0

Since the difference is zero, integers in the form AAAA and ABBA are divisible by 11. So these numbers can't be prime.

This leaves us with only one palindromic, prime, and even-digit positive integer under 10000. This integer is 11.

Avatar Anon
May 20, 2014

n n is an even digit palindrome, so, n must be of the form a a \overline{aa} or a b b a \overline{abba}

For first case , 11 a a a { 1 , 2 , . . . , 9 } , 11|\overline{aa} \forall a\in\{1,2,...,9\}, so n = a a n=\overline{aa} is prime n = a a = 11 \iff n=\overline{aa}=11

For second case, n = a b b a = 1000 a + 100 b + 10 b + a = 1001 a + 110 b = 11 ( 91 a + 10 b ) 11 a b b a n=\overline{abba}=1000a+100b+10b+a=1001a+110b=11(91a+10b)\implies 11|\overline{abba} and hence there is no palindromic prime of 4 4- digits.

So, the only number satisfying all the properties is 11 11 .

Abhishek Rawat
May 20, 2014

It's given than n has even number of digits and its a palindrome. Thus given number will be divisible by 11. But it's also given that number is prime which left us with the only answer,11.

Need to explain why divisible by 11

Calvin Lin Staff - 7 years ago
Anton Than Trong
May 20, 2014

Due to the divisibility rule of 11, d 1 - d 2 + d 3 - ... - d n(where "d n" is the nth digit), all numbers with an even number digits that are also palindromes are not prime. The reason for this is that d 1 "cancels out" with d n, d 2 "cancels out" with d_(n-1), and so on. Thus, every number following the three rules are divisible by 11. The only prime that is divisible by 11 is 11 itself. Since there is only 1 answer, the answer is 1 .

Calvin Lin Staff
May 13, 2014

If a number is a palindrome and has an even number of digits, then the sum of the digits in odd positions is the same as the sum of the digits in even positions, which means the number is divisible by 11. The only prime divisible by 11 is 11, so there is only one such number.

Rajat Gupta
May 20, 2014

1

Not a solution

Calvin Lin Staff - 7 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...