7 5 n + 1 7\mid 5^n +1

7 5 n + 1 \large{7 \mid 5^n +1}

Find the number of positive integers n 1000 n \leq 1000 that satisfy the condition above.


The answer is 167.

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

We note that 7 5 n + 1 5 n 1 (mod 7) 7 \mid 5^n + 1 \implies 5^n \equiv -1 \text{ (mod 7)} . Consider 5 n ( 7 2 ) n ( 2 ) n (mod 7) 5^n \equiv (7-2)^n \equiv (-2)^n \text{ (mod 7)} . For the first few n n , we have ( 2 ) n = 2 , 4 , 1 , 2 , 4 , 1 , 2 , . . . . (-2)^n = -2, 4, -1, 2, -4, 1, -2, .... We note that ( 2 ) n (-2)^n has a period of 6 and ( 2 ) n = 1 (-2)^n = -1 , when n m o d 6 = 3 n \bmod 6 = 3 . For n 1000 n \le 1000 , the acceptable n = 3 , 9 , 15 , . . . 999 n=3,9,15,... 999 , a total of 167 \boxed{167} of them.

Computer science solution cuz number theory ain't my cup of tea xD

1
2
3
4
5
6
7
n=1
s=0
while n <= 1000:
    if (5**n + 1) % 7 == 0:
        s += 1
    n += 1
print(s)

I didn't read the question fully and thought I have to enter their sum facepalm

Zainul Niaz - 3 years, 11 months ago

Log in to reply

I know how it feels like when we did the problem and make very silly mistakes. Cheer up bro. It happens to me atleast once a day in brilliant :P. But nowadays I am reading qs carefully :)

Md Zuhair - 3 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...