ϕ \phi nd the Remainder

ϕ ( n ) \phi(n) is the number of positive integers less than n n that are relatively prime to n . n.

Find the remainder when ϕ ( 2 2018 + 1 ) \phi\big(2^{2018} + 1\big) is divided by 4036.


Bonus : Generalize for the remainder when ϕ ( 2 n + 1 ) \phi(2^n+1) is divided by 2 n . 2n.

0 1 2018 4035

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.

6 solutions

Steven Yuan
Mar 7, 2018

Relevant wiki: Order of an Element

We tackle the generalization first. So we will prove that, for all positive integers n , n, we must have 2 n ϕ ( 2 n + 1 ) . 2n|\phi(2^n + 1).

Let d = ord 2 n + 1 ( 2 ) . d = \text{ord}_{2^n + 1}(2). By Euler's Theorem, 2 ϕ ( 2 n + 1 ) 1 ( m o d 2 n + 1 ) , 2^{\phi(2^n + 1)} \equiv 1 \! \pmod{2^n + 1}, so d ϕ ( 2 n + 1 ) . d|\phi(2^n + 1). We also have 2 n 1 ( m o d 2 n + 1 ) , 2^n \equiv -1 \! \pmod{2^n + 1}, and squaring both sides gives 2 2 n 1 ( m o d 2 n + 1 ) . 2^{2n} \equiv 1 \! \pmod{2^n + 1}. Thus, d 2 n . d|2n.

Now, we will show that d = 2 n d = 2n by showing that the other possible values for d d do not work. Suppose that d 2 n d \neq 2n i.e. d d is a proper divisor of 2 n . 2n. Then, 1 d n , 1 \leq d \leq n, so 1 < 2 d 2 n < 2 n + 1. 1 < 2^d \leq 2^n < 2^n + 1. However, this means that 2 d ≢ 1 ( m o d 2 n + 1 ) 2^d \not \equiv 1 \! \pmod{2^n + 1} ; if it were, then 2 d = 1 , 2^d = 1, which is impossible.

Therefore, we must have d = 2 n , d = 2n, so 2 n ϕ ( 2 n + 1 ) , 2n|\phi(2^n + 1), and the claim is proven. \blacksquare

The problem is a direct application of this statement. If we let n = 2018 , n = 2018, we get 4036 ϕ ( 2 2018 + 1 ) , 4036|\phi(2^{2018} + 1), so the remainder is simply 0 . \boxed{0}.


Note: There is nothing special about powers of 2; in fact, for any positive integer a 2 , a \geq 2, we must have 2 n ϕ ( a n + 1 ) , 2n|\phi(a^n + 1), which can be proven in the same way as we did above.

Having shown that 2 2 n 1 ( m o d 2 n + 1 ) 2^{2n} \equiv 1 \pmod{2^n+1} , we can now simply note that 1 < 2 x 2 n < 2 n + 1 1 < 2^x \le 2^n < 2^n+1 for any proper factor x x of 2 n 2n , from which it is obvious that 2 x ≢ 1 ( m o d 2 n + 1 ) 2^x \not\equiv 1 \pmod{2^n+1} . Thus the order of 2 2 is 2 n 2n , as required.

Mark Hennings - 3 years, 3 months ago

Log in to reply

Thanks for the suggestion! I did sort of realize that the bounds on 2 d 2^d for d 2 n d \neq 2n made it impossible for it to be 1 modulo 2 n + 1 2^n + 1 at the end of that long analysis, but I was unaware that I could use that to simplify the entire argument.

Steven Yuan - 3 years, 3 months ago

Why can't 2n|d, instead of d|2n at the end of the second paragraph?

John Carpenter - 3 years, 2 months ago

Log in to reply

d d is defined to be the smallest positive integer such that 2 d 1 ( m o d 2 n + 1 ) . 2^d \equiv 1 \! \pmod{2^n + 1}. (See the wiki link at the beginning of the solution for more information.) Since 2 2 n 2^{2n} is also 1 modulo 2 n + 1 , 2^n + 1, we can write 2 n = k d 2n = kd for some positive integer k , k, meaning that d 2 n . d|2n. If instead we had 2 n d , 2n|d, then that would imply 2 n d , 2n \leq d, which contradicts d d being the order of 2 modulo 2 n + 1. 2^n + 1.

Steven Yuan - 3 years, 2 months ago

I hate math😩

Mohd O - 3 years, 2 months ago

Log in to reply

Hey Mohd, it sounds like you’re frustrated about something related to math. Can you elaborate?

Steven Yuan - 3 years, 2 months ago

Oh gosh. I read it as find the quotient ...

Matt McNabb - 3 years, 2 months ago

What's the o r d ord function?

Maxence Seymat - 3 years, 2 months ago

Log in to reply

The number o r d 2 n + 1 ( 2 ) \mathrm{ord}_{2^n+1}(2) is the smallest positive integer d d such that 2 d 1 ( m o d 2 n + 1 ) 2^d \equiv 1 \pmod{2^n+1} . It is then true that whenever m m is a positive integer such that 2 m 1 ( m o d 2 n + 1 ) 2^m \equiv 1 \pmod{2^n+1} then o r d 2 n + 1 ( 2 ) \mathrm{ord}_{2^n+1}(2) must divide m m .

Mark Hennings - 3 years, 2 months ago
Kelvin Hong
Mar 8, 2018

Please my friends help me to check my solution, is my solution correct?

First, factorize the number 2 2018 + 1 = 4 1009 + 1 = 5 ( 4 1008 4 1007 + 4 1006 . . . 4 + 1 ) 2^{2018}+1=4^{1009}+1=5(4^{1008}-4^{1007}+4^{1006}-...-4+1)

I consider the number 4 1008 4 1007 + 4 1006 . . . 4 + 1 4^{1008}-4^{1007}+4^{1006}-...-4+1 as a prime, but I don't know how to prove it.

so ϕ ( 2 2018 + 1 ) = ( 2 2018 + 1 ) ( 4 5 ) ( 4 1008 4 1007 + 4 1006 . . . 4 4 1008 4 1007 + 4 1006 . . . 4 + 1 ) = 16 ( 4 1007 4 1006 + . . . 1 ) \phi (2^{2018} + 1)=(2^{2018} + 1)(\frac{4}{5})(\frac{4^{1008}-4^{1007}+4^{1006}-...-4}{4^{1008}-4^{1007}+4^{1006}-...-4+1})=16(4^{1007}-4^{1006}+...-1)

On division by 4036 4036 , in fact it can be factorize as 2 2 × 1009 2^2 \times 1009 which 1009 1009 is a prime, we can do ϕ ( 2 2018 + 1 ) ( m o d 4036 ) \phi (2^{2018} + 1)(mod 4036) by using Chinese Remainder Theorem. It is easy to show that ϕ ( 2 2018 + 1 ) 0 ( m o d 4 ) \phi (2^{2018} + 1) \equiv 0 (mod 4) , then let

ϕ ( 2 2018 + 1 ) 16 5 ( 4 1008 1 ) x ( m o d 1009 ) \phi (2^{2018} + 1) \equiv \frac{16}{5}(4^{1008} - 1) \equiv x (mod 1009)

5 x 16 ( 4 1008 1 ) 16 ( 1 1 ) 0 ( m o d 1009 ) 5x \equiv 16(4^{1008}-1) \equiv 16(1-1) \equiv 0 (mod 1009)

x 0 ( m o d 1009 ) x \equiv 0 (mod 1009)

this implies that ϕ ( 2 2018 + 1 ) 0 ( m o d 4036 ) \phi (2^{2018} + 1) \equiv \boxed 0 (mod 4036) , completes the proof

2 2018 + 1 = 4 ( 2 504 ) 4 + 1 = 4 ( 2 504 ) 4 + 4 ( 2 504 ) 2 + 1 4 ( 2 504 ) 2 = [ 2 ( 2 504 ) 2 + 1 ] 2 [ 2 ( 2 504 ) ] 2 = [ 2 ( 2 504 ) 2 2 ( 2 504 ) + 1 ] [ 2 ( 2 504 ) 2 + 2 ( 2 504 ) + 1 ] \begin{aligned} &2^{2018}+1\\ =&4(2^{504})^{4}+1 \\ =&4(2^{504})^4+4(2^{504})^2+1-4(2^{504})^2 \\ =&[2(2^{504})^2+1]^2-[2(2^{504})]^2 \\ =&[2(2^{504})^2-2(2^{504})+1][2(2^{504})^2+2(2^{504})+1] \end{aligned}

I believe it isn't hard to prove that 4 1008 4 1007 + 4 1006 . . . 4 + 1 4^{1008}-4^{1007}+4^{1006}-...-4+1 isn't a prime.

Chan Tin Ping - 3 years, 3 months ago

Log in to reply

Thank you! I think I should improve my solution.

Kelvin Hong - 3 years, 3 months ago
Ariijit Dey
Mar 26, 2018

I am trying to come up with a solution that uses elementary box principles because I don't feel the problem needs a number theoretic Perspective; I will edit this as soon as I reach the solution... .

I am a bit confused. I read the problem as saying that Phi(n) refers to the number of relatively prime numbers (with respect to n) that are strictly less than n. However whenever I looked up the definition on Wikipedia or Wolfram Alpha, the definition seems NOT to be strictly less than, but less than OR equal to n.

Furthermore in trying to solve the problem I used the Euler Totient function on Mathematica, which appears to use the definition that includes n, and thus when computing the remainder I always used ( EulerPhi[ 2^n + 1] - 1 ) instead of ( EulerPhi[ 2^n + 1] ). Then when computing the remainder with my interpretation of the totient function given by the Brilliant problem, I found that the remainder grew linearly like: Remainder(n) = 2n -1. Thus the answer I gave was 4035 = 2*(2018) - 1.

I did find that if I used just the Euler Totient function, NOT including my subtraction of 1, then the remainder always ends up being 0.

So my question is: Is the Euler Totient function as defined in the Brilliant problem the same as the ordinary one? Am I misinterpreting the phrase "number of positive integers less than n" ? Thanks for any help you all could provide.

Justin White - 3 years, 2 months ago

Log in to reply

n n is not relatively prime to n , n, since gcd ( n , n ) = n . \gcd(n, n) = n. Thus, the definition of ϕ ( n ) \phi(n) as "all positive integers less than n n relatively prime to n n " is the same as the definition "all positive integers less than or equal to n n relatively prime to n . n. "

Steven Yuan - 3 years, 2 months ago

Log in to reply

Oh! That makes sense. I think I see now what my problem was. For whatever reason I think I forgot to include the fact that 1 is relatively prime to every n (not equal to 1), which accounts for the missing 1 I seemed to have. Thanks for your help!

Justin White - 3 years, 2 months ago

@Ariijit Dey have you made any progress on your solution?

Steven Yuan - 3 years, 2 months ago
Vivek Veer
Mar 31, 2018

Note that,

2^{n}+1 | 2^{\phi(2^n+1)}-1

But since, ord_{2^n}2=2n.

We have, 2n | \phi(2^n+1).

Tom Van Lier
Mar 31, 2018

Relevant wiki's : Order of an Element and Euler's totient function

Using the property that n ϕ ( a n 1 ) n | \phi (a^n -1) for all positive integers a and n, and noting that :

ϕ ( 2 2 n 1 ) = ϕ ( 2 n 1 ) . ϕ ( 2 n + 1 ) \phi(2^{2n} - 1) = \phi(2^n - 1) . \phi(2^n + 1) (gcd of both arguments of the totient function in the RH side is clearly 1) we get that

(1) ϕ ( 2 n 1 ) \phi(2^n - 1) is divisible by n (using the mentioned property)

(2) ϕ ( 2 n + 1 ) \phi(2^n + 1) is divisible by 2 (an established result if n > 2, which you can very easily verify by looking into the formula for computing ϕ ( n ) \phi(n) ).

This means that 2 n ϕ ( 2 2 n 1 ) 2n | \phi(2^{2n} - 1) . The specific case follows easily by setting n = 2018.

Krishna Sharma
Mar 30, 2018

I assumed it to be a Mersenne prime and then 2^ 2018 is Φ(2^2018 + 1). Then 2^2018 is definitely divisible by 4036. I'm not sure tho.

2 2018 + 1 2^{2018} + 1 isn't prime. It's divisible by 5.

Steven Yuan - 3 years, 2 months ago

Yes then it was just a lucky guess.

Krishna Sharma - 3 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...