Fed up of all those 1's

1111111 1 number of 1’s = 124 ( m o d 271 ) = ? \underbrace{1111111\ldots 1}_{\text{number of 1's = 124}} \pmod {271} = \, ?


The answer is 27.

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.

8 solutions

Nelvson Shine
Apr 5, 2014

the easiest way to find the remainder is find the pattern.

a 1 a_1 mod 271 is 1,

a 2 a_2 mod 271 is 11,

a 3 a_3 mod 271 is 111,

a 4 a_4 mod 271 is 27,

a 5 a_5 mod 271 is 0,

a 6 a_6 mod 271 is 1,

a 7 a_7 mod 271 is 11,

a 8 a_8 mod 271 is 111,

a 9 a_9 mod 271 is 27,

a 10 a_{10} mod 271 is 0

if you have a couple of eagle eyes, you will find that if n = 5, than a n a_n mod 271 is 0, and a n 1 a_{n-1} is 271.

The question is what is a 214 a_{214} mod 271. Since 214 = 215 - 1, and from the pattern above, we find that a 215 a_{215} mod 271 is 0, and a 214 a_{214} mod 271 is 27. Thus the answer is so.

did it the same way. somehow i feel modulo arithmetic is the best blessing to number theory

Krishna Ar - 7 years, 2 months ago

You should write 124 instead of 214

Rishik Jain - 5 years, 6 months ago

the second last line should conclude as ".... a n 1 a_{n-1} is 27" and not as ".... a n 1 a_{n-1} is 271".

Ankit Chabarwal - 4 years, 8 months ago

Did the same way.

Niranjan Khanderia - 3 years, 7 months ago

Same aaproach.but ithink no special modular aritm. Operation is needed to solve it.Just a bit of observation is enough

aman mishra - 3 years ago

*pair of eagle eyes

Kuntal Sarkar - 2 years, 11 months ago
Arghyanil Dey
Apr 21, 2014

If we divide 1111 by 271 the reminder is 27.

So when we divide 11111by 271 the reminder is 0

So it is clear that in every repeatation of 5 digits (1) the reminder obtained by dividing he no by 27 is 0.

The no. where 1is repeated 124 times when divided by 271 ,the digit till 120th place is divided by 271 such that no reminder is obtained . When last four digits are divided by 271 the reminder obtained is 27.

So ,27 is the reminder.

Mykyta Shvets
Jul 4, 2018

Another way to solve it is without using the "1111" pattern.

Notice, that 1111111...1 = 1 0 0 + 1 0 1 + 1 0 2 + 1 0 3 + . . . + 1 0 123 1111111...1=10^0+10^1+10^2+10^3+...+10^{123} .

Find another pattern in the different powers of 10:

1 0 1 10 ( m o d 271 ) 10^1\equiv 10 \pmod{271}

1 0 2 100 ( m o d 271 ) 10^2\equiv 100 \pmod{271}

1 0 3 187 ( m o d 271 ) 10^3\equiv 187 \pmod{271}

1 0 4 244 ( m o d 271 ) 10^4\equiv 244 \pmod{271}

1 0 5 1 ( m o d 271 ) 10^5\equiv 1 \pmod{271}

1 0 6 10 ( m o d 271 ) 10^6\equiv 10 \pmod{271}

The pattern repeats after every 5 powers. Thus, there are 120 / 5 = 24 120 / 5 = 24 cycles. Now, simplify the expression above:

1111111...1 ( m o d 271 ) 1111111...1 \pmod{271}

1 0 0 + 1 0 1 + 1 0 2 + 1 0 3 + . . . + 1 0 123 ( m o d 271 ) \equiv10^0+10^1+10^2+10^3+...+10^{123} \pmod{271}

1 0 0 + 24 × ( 10 + 100 + 187 + 244 + 1 ) + 1 0 121 + 1 0 122 + 1 0 123 ( m o d 271 ) \equiv10^0+24\times(10+100+187+244+1)+10^{121}+10^{122}+10^{123} \pmod{271}

1 + 24 × ( 271 ) + 10 + 100 + 187 ( m o d 271 ) \equiv1+24\times(271)+10+100+187 \pmod{271}

24 × ( 0 ) + 298 ( m o d 271 ) \equiv24\times(0)+298 \pmod{271}

27 ( m o d 271 ) \equiv27 \pmod{271}

So, even if you didn't see the pattern with 1s, you can solve the problem anyway.

just curious, it there a way to confirm if the pattern repeats without actually checking for alot of terms? Here, you assume that the pattern repeats (which it does in this case) because 10^6 was congruent to 10^1 (mod 271) but mathematically is there a way to confirm?

Ayush Koul - 6 months, 3 weeks ago

Log in to reply

Yes, it does repeat. 10^5 is congruent to 1 and after that 10^6 can be written as (10^5) * (10). Replace 10^5 with 1 and the proof is done.

Rishabh Yadav - 6 months ago
Muhammed Shameel
Aug 14, 2019

Notice that numbers having any multiple of 5 1's are divisible by 271 So we can write

111 11 124 1’s ( m o d 271 ) = 111 11 120 1’s × 10000 + 1111 \underbrace{111\ldots11}_{\text{124 1's}} \pmod{271} = \underbrace{111\ldots11}_{\text{120 1's}} \times 10000 + 1111

111 11 120 1’s \underbrace{111\ldots11}_{\text{120 1's}} is divisible by 271

So,

111 11 120 1’s × 10000 + 1111 0 + 1111 ( m o d 271 ) 27 \underbrace{111\ldots11}_{\text{120 1's}} \times 10000 + 1111 \equiv 0 + 1111 \pmod{271} \equiv \boxed{27}

Vu Vincent
Jul 11, 2017

First, I tried to find an integer x x such that 271 x 271x has the one at the digit place. Now for this to have a one at the digit place, x x must have a one at the digit place as well. By trial and error, 271 × 41 = 11111 271\times41 = 11111

Observe that 124 4 ( m o d 5 ) 124 \equiv 4 \quad (mod \quad5) , all-in-all we need to compute 1111 ( m o d 271 ) = 27 1111 \quad(mod \quad 271) = \boxed{27}

Carsten Meyer
Mar 29, 2021

For simplicity, let n = 124 n=124 . We use the geometric sum to simplify our number x : = k = 0 n 1 1 0 k = 1 0 n 1 10 1 = 9 1 ( 1 0 n 1 ) \begin{aligned} x&:=\sum_{k=0}^{n-1}10^k=\frac{10^n-1}{10-1}=9^{-1}\left(10^n-1\right) \end{aligned}

We define r k : = 1 0 k m o d 271 r_k:=10^k \mod 271 . With a small table we find r 5 = 1 0 5 1 m o d 271 r_5=10^5\equiv 1\mod 271 . Via Euclid's Extended Algorithm we obtain 9 1 30 m o d 271 9^{-1}\equiv -30\mod 271 and get x ( 30 ) ( r n 1 ) ( 30 ) ( 1 24 r 4 1 ) = 840 27 m o d 271 k 0 1 2 3 4 5 r k 1 10 100 84 27 1 \begin{aligned} x & \equiv (-30)\cdot (r_n-1) \equiv (-30)\cdot \left(1^{24}\cdot r_4-1\right) =840\equiv \boxed{27}\mod 271 &&&&& \left|\quad\begin{array}{r|rrrrrr} k & 0 & 1 & 2 & 3 & 4 & 5 & \cdots\\\hline r_k & 1 & 10 & 100 & -84 & -27 & 1 & \cdots \end{array}\right. \end{aligned}

Zyberg Nee
Jun 17, 2016

I had a lot of fun with trying to figure this out, here is what I thought to do:


Let's find such value of 11...1 that mod (271) would be congruent to 0.

It is 11111 (five 1).

Now we can subtract LHS from the original number and take modulus of that, then add it back. Surely, we subtract 5 ones and 119 zeros to get 0 from mod (271).

Since adding 0 doesn't actually do anything, we can do that for 23 more times (or just arrive at conclusion that 124 - 120 = 4 ones) to get a number 1111 in mod (271) and that is congruent to 27!


An article that explains this very well: http://www.devx.com/tips/Tip/39012 (you will have to ignore the fact that it's originally written for programming).

Anirudha Nayak
Mar 23, 2014

firstly rewrite a n a_{n} as 1+10+100+1000.....271 times use GP formula next use binomial expansion

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...