How many are prime?

Let a n a_n denote the n n -digit integer, 111111111 1 n number of 1’s \underbrace{111111111\ldots 1}_{n \text{ number of 1's}} .

How many of the following are prime numbers ?

a 2 , a 91 , a 837 , a 951 \large a_2, a_{91}, a_{837}, a_{951}

0 4 1 2 3

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.

5 solutions

Michael Mendrin
Nov 28, 2015

a 2 , a 19 , a 23 , a 317 , a 1031 \large a_2, a_{19}, a_{23}, a_{317},a_{1031} are the only ones known to be primes.

Jaleb Jay
Nov 23, 2015

We already know a 2 = 11 a_2 = 11 is prime.

For each other case note that if n = i j n = ij for i , j 1 i,j \neq 1 , then b i = ( 1 0 i 1 ) / 9 b_i = (10^i-1)/9 and a n / b i = 10...010...01 a_n/b_i=10...010...01 with j j 1's and i 1 i-1 zeros in between each 1. Since 91=7(13), 837=3(279), and 951=3(319). The only case that is prime is a 2 a_2 .

Note: this is the same way as factoring x n 1 x i 1 \frac{x^n-1}{x^i-1}

Jaleb Jay - 5 years, 6 months ago
Arulx Z
Dec 19, 2015
This solution is similar to Jaleb's solution but I decided to post it anyways to provide an alternate method.

r = 111111111 1 n number of 1’s r = \underbrace{111111111\ldots 1}_{n \text{ number of 1's}}

To solve this problem, we can use the fact that if n n is composite then the above number is composite. But let's prove the statement before.

Let n n be equal to a b ab and s s be equal to 111 1 a number of 1’s \underbrace { 111\dots 1 }_{a \text{ number of 1's}} . a a needs to be greater than 2 while b b needs to be greater than 1.

We can rewrite r r as

s 10 n a + s 10 n 2 a + + s s\cdot { 10 }^{ n-a }+s\cdot { 10 }^{ n-2a }+\dots +s

Since s s is common in every term, r r is not prime.

As 91, 837 and 951 are all composite, they are out of the list.

Now we are left with 11. Through analysis, it's the only prime.

Moderator note:

Apart from saying "Since s s is common in every term", we still have to ensure that the other term is not 1. For example, 11 × 3 11 × 2 11 \times 3 - 11 \times 2 is a prime, even though 11 is common in every term.

@Calvin Lin Thanks! I have modified my answer.

Arulx Z - 5 years, 5 months ago

Log in to reply

Hm, I don't see it reflect that we have r = s × t r = s \times t with t > 1 t > 1 . We need that to ensure that r r is not prime. Yes, I agree that it's obvious we have t > 1 t > 1 , but it should still be stated.

Calvin Lin Staff - 5 years, 5 months ago
Figel Ilham
Nov 28, 2015

If n n is composite, obviously that a n a_n is not a prime. The inverse here doesn't apply.

Proof: Let a n a_n be written as the polynomial function for f : N N f:\mathbb{N} \rightarrow \mathbb{N} , f ( x ) = 1 + x + . . . + x n 2 + x n 1 f(x) =1+x+...+ x^{n-2} +x^{n-1} (later, we substitute x = 10 x=10 ).

From the polynomial, create partitions by m , m > 1 m, m>1 of f ( x ) f(x) in order, e,g. f ( x ) = 1 + x + . . . + x n 1 = ( 1 + x + . . . + x m 1 ) + ( x m + . . . ) + . . . + x n 1 f(x) = 1+x+...+x^{n-1}=(1+x+ ... +x^{m-1}) +(x^{m} + ... ) + ... + x^{n-1}

Let B B as the sets of the partitions and let the partitions become somewhat as a subset of b 1 , b 2 , . . . , b j b_1, b_2, ..., b_j . f ( x ) f(x) will be factorable if B B' \in \emptyset . Thus, there will be n m \frac{n}{m} subsets, which m n m|n , from b 1 , b 2 , . . . , b n m b_1, b_2, ..., b_{\frac{n}{m}} . Exactly, the GCF of the subsets is b 1 b_1 . We may factor f ( x ) f(x) as f ( x ) = ( 1 + x + . . . + x m 1 ) ( 1 + x m + . . . + x n m ) f(x) = (1+x+...+x^{m-1})(1+x^m+...+x^{n-m})

Setting to x = 10 x=10 . f ( 10 ) f(10) consists of at least two factors, so it won't be prime. In conclusion, for n n composite and a subset partitions of m m , which is b 1 , b 2 , . . . , b j B b_1, b_2, ..., b_j \in B , and B B' \in \emptyset , a n = f ( 10 ) a_n = f(10) is not prime.

For n n prime, the inverse of above is broken. Easy to prove that for n = 2 n = 2 , we have 11 11 which is a prime, but n = 3 n=3 , we have 111 111 which is divisible by 3 3 .

Swagath N Shaji
Nov 22, 2015

a2 is a prime number=11 all of these type of numbers such as 111,1111,11111,... except 1 and 11 are composite numbers. so a2 is the only prime number in the options.

i know a837 and a951 are divisible by 3.. But how a91

Dev Sharma - 5 years, 6 months ago

Log in to reply

a91 = 11*(45 times 10).

Naman Singh - 5 years, 6 months ago

Log in to reply

brother .. we know that for a number to be a multiple of 11 ... the difference between the sum of odd-positioned digits and sum of the even-positioned digits hav to be a multiple of 11 ... but here the difference is 1 ..[(46 x 1) - (45 x 1) = 1] ... then how come you tell it is a multiple of 11???

awaiting ur gud reply

Ganesh Ayyappan - 5 years, 6 months ago

If you check the idea in my solution, you'll notice 91 = 7*13. By trying a91/a7 and a91/a13, you'll find that both these values are integers.

Jaleb Jay - 5 years, 6 months ago

same question i have

Ganesh Ayyappan - 5 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...