Alternate

What is only the prime among the positive integers, written as usual in base 10 10 , are such that their digits are alternating 1 1 ’s and 0 0 's, beginning and ending with 1 1 ?


The answer is 101.

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.

2 solutions

Giorgos K.
May 9, 2018

Confirmed that 101 101 is the only one, using M a t h e m a t i c a Mathematica , up to 1010...101 1010...101 => 3000 3000 d i g i t s digits

here is the program if you want to search further

Monitor[For[n=1,n<10000,n++,If[PrimeQ@FromDigits@Join[{1},Flatten@Table[{0,1},n]],Print@n]],n]

Chris Lewis
Oct 17, 2019

Define the n t h n^{th} term of the sequence to be a n a_n , so that a 1 = 1 a_1=1 , a 2 = 101 a_2=101 , a 3 = 10101 a_3=10101 , etc, and the decimal expansion of a n a_n contains n n 1 1 s. We want to show that a 2 = 101 a_2=101 is the only prime in the sequence. The simplest thing to do is to try factorising, and look for patterns.

One idea is to note that when n n is a multiple of 3 3 , by the usual divisibility test, so is a n a_n . Similarly, if n n is a mulitple of 11 11 , so is a n a_n . But this approach doesn't get too far - there are still lots of gaps.

Playing around with the factorisations, we can find two patterns. For even n n :

a 2 = 101 = 101 × 1 a_2=101=101 \times 1

a 4 = 1010101 = 101 × 10001 a_4=1010101=101 \times 10001

a 6 = 101010101 = 101 × 100010001 a_6=101010101=101 \times 100010001

and it's easy to see that this pattern continues.

For odd n n :

a 1 = 1 = 1 × 1 a_1=1=1 \times 1

a 3 = 10101 = 91 × 111 a_3=10101=91 \times 111

a 5 = 101010101 = 9091 × 11111 a_5=101010101=9091 \times 11111

a 7 = 1010101010101 = 909091 × 1111111 a_7=1010101010101=909091 \times 1111111

This pattern is slightly less obvious, but still fairly easy to prove.

If we define r 1 = 1 r_1=1 , r 2 = 11 r_2=11 , r 3 = 111 r_3=111 , etc, we conjecture from the pattern that r n r_n divides a n a_n whenever n n is odd.

Note that each of the a n a_n and r n r_n can be thought of as sums of geometric progressions. This gives the formulas a n = 1 99 ( 10 0 n 1 ) a_n=\frac{1}{99} \left(100^n-1 \right) and r n = 1 9 ( 1 0 n 1 ) r_n=\frac{1}{9} \left(10^n-1 \right) .

So we want to show that a n r n \frac{a_n}{r_n} is an integer for odd n n .

We have a n r n = 10 0 n 1 11 ( 1 0 n 1 ) = 1 0 2 n 1 11 ( 1 0 n 1 ) = ( 1 0 n 1 ) ( 1 0 n + 1 ) 11 ( 1 0 n 1 ) = 1 0 n + 1 11 \begin{aligned} \frac{a_n}{r_n} &= \frac{100^n-1}{11 \left(10^n-1 \right)}\\ &=\frac{10^{2n}-1}{11 \left(10^n-1 \right)}\\ &= \frac{\left(10^{n}-1\right)\left(10^{n}+1\right)}{11 \left(10^n-1 \right)}\\ &= \frac{10^{n}+1}{11} \end{aligned}

and since n n is odd, we can see this last form is indeed an integer (using the fact that x + 1 x+1 divides x n + 1 x^n+1 when n n is odd).

So we've proved that the only prime in the sequence is 101 101 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...