Tricky Congruence

a x a 2 ( m o d ( a 1 ) ) {a^x \equiv a-2 \pmod{{\small(a-1)}}}

If a a and x x are positive integers greater than 2, what is the value of a ? a?


The answer is 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.

11 solutions

Akash Gaonkar
Jun 8, 2015

a x a 2 ( m o d ( a 1 ) ) n Z : a x = n ( a 1 ) + a 2 n = a x a + 2 a 1 a^x \equiv a-2 (mod (a-1)) \\ \Rightarrow \exists\ n \in \mathbb{Z}: a^x = n(a-1) + a - 2 \\ \Rightarrow n = \frac{a^x - a + 2}{a-1}

Since a n b n = ( a b ) ( a n 1 + a n 2 b + a n 3 b 2 + + a b n 2 + b n 1 ) a^n - b^n = (a - b)(a^{n-1}+a^{n-2}b+a^{n-3}b^2+\cdots+ab^{n-2}+b^{n-1}) , we know that a x 1 x = ( a 1 ) ( a x 1 + a x 2 + a x 3 + . . . + 1 ) a^x - 1^x = (a - 1)(a^{x-1}+a^{x-2}+a^{x-3}+...+1) .

Thus, n = ( a x 1 ) a + 3 a 1 = ( a x 1 + a x 2 + a x 3 + . . . + 1 ) a 3 a 1 n = \frac{(a^x - 1) - a + 3}{a - 1} = (a^{x-1}+a^{x-2}+a^{x-3}+...+1) - \frac{a - 3}{a - 1} .

Since n is an integer, and all the other terms are integers, we know that a 3 a 1 \frac{a - 3}{a - 1} is also an integer.

We know that a > 2 a \gt 2 , and if a > 3 a \gt 3 , our denominator would exceed our numerator, and we could never get an integer.

At a = 3 a = 3 , a 3 a 1 = 0 \frac{a - 3}{a - 1} = 0 , providing a valid value of n. Thus, a = 3 a = 3 . QED.

There is a much simpler approach to reach the conclusion.

Hint: What is a n ( m o d a 1 ) a^n \pmod{a-1}

Calvin Lin Staff - 6 years ago

Log in to reply

I feel so stupid. Wow. a n ( m o d a 1 ) = 1 1 = a 2 a = 3. a^n\ (mod\ a-1) = 1 \\ \Rightarrow 1 = a - 2\\ \Rightarrow a = 3. Thank you.

Akash Gaonkar - 6 years ago

Log in to reply

Perfect!

(By right, first line should be a n 1 n 1 ( m o d a 1 ) a^n \equiv 1^n \equiv 1 \pmod{a-1} )

Calvin Lin Staff - 6 years ago

Log in to reply

@Calvin Lin Shouldn't it be (mod a-1)?

Rishik Jain - 5 years, 6 months ago

Log in to reply

@Rishik Jain Yes thanks! I've updated both comments :)

Calvin Lin Staff - 5 years, 6 months ago

@Calvin Lin How do you get a^n = 1(mod (a-1))

Naveen Jacob - 3 years, 1 month ago

Log in to reply

@Naveen Jacob

  1. a 1 ( m o d a 1 ) a \equiv 1 \pmod { a-1 }
  2. 1 n 1 ( m o d a 1 ) 1 ^ n \equiv 1 \pmod { a - 1 }
Combine these 2 as I did, to get a n 1 n 1 ( m o d a 1 ) a^ n \equiv 1 ^n \equiv 1 \pmod{a-1} .

Calvin Lin Staff - 3 years, 1 month ago

Don't feel dumb - you solution was superb, though a little complicated... :-)

Terry Smith - 4 years, 10 months ago

wolframalpha code mod(a^x,a-1)=a-2, a>2, x>2

there are 8 integer solutions (a,x)

(3,3), (3,4,), ... , (3,9), (3,10)

a=3

Harout G. Vartanian - 4 years, 4 months ago
Diego G
Aug 16, 2016

Let b : = a 1 2 b:=a-1\geq2 , then the equality reads ( b + 1 ) x b 1 ( m o d b ) 1 x 1 ( m o d b ) 2 0 ( m o d b ) . (b+1)^x\equiv b-1\pmod{b}\iff 1^x\equiv-1\pmod{b}\iff 2\equiv 0\pmod{b}. This means that b 2 b|2 , so necessarily b = 2 b=2 . Therefore, a = 3 a=3 .

how did you get 1^x≡−1(mod b)?

Jiahao Chen - 1 year, 7 months ago

From binomial expansion you can reduce "(b+1)^x mod b" to 1^x since in the expansion series only one item (1^x) is not a multiple of b, and "b-1 mod b" becomes -1 is obvious since you just need to subtract b from that.

Jack Wang - 1 year, 4 months ago
Adarsh Kumar
Jun 6, 2015

a x a 2 1 ( m o d a 1 ) a x + 1 0 ( m o d a 1 ) a x + 1 a 1 is and integer a x 1 ( m o d a 1 ) a x + 1 2 ( m o d a 1 ) ( a 1 ) 2 a = 3 a^x\equiv a-2 \equiv -1 \pmod{a-1}\\ \Longrightarrow a^x+1\equiv 0 \pmod{a-1}\\ \Longrightarrow \dfrac{a^x+1}{a-1}\text{is and integer}\\ a^x\equiv 1\pmod{a-1}\\ \Longrightarrow a^x+1\equiv 2\pmod{a-1}\\ \Longrightarrow (a-1)|2\\ a=3 .

Moderator note:

This solution is currently incorrect.

How did you go from the third to the fourth line?

Note that seeming contradiction between the second and the fourth line. You "magicked" 1 over without changing the sign. This would necessarily require that a 2 ( m o d a 1 ) a \equiv 2 \pmod{a-1} , IE you made the assumption that a = 3 a = 3 .

Calvin Lin Staff - 6 years ago

Log in to reply

I posted a more better question. Click here for viewing .Thanks!

Nihar Mahajan - 6 years ago

Just ask yourself, : "" Hmm, this looks like it could be Fermat's Little Theorem. What would be needed for it is be so ? "" Well, the right needs to equal 1.

Then you'll notice that the right side equals 1 if a = 3.

Then you will also notice that the modulus will equal 3 -1 = 2. So this means that P = 2.

Then you will also notice since x must be the same as P-1 , it means that x = 1. So we also got x !

Then we confirm this by noticing that

3^1 - 1 = 2. which gives an integer when divided by the modulus 2.

Done !

DarkMind S. - 4 years, 10 months ago
Vansh Gupta
Jan 22, 2017

a congruent to 1 ( mod a-1 )

a^x congruent to 1^x (mod a-1)

hence 1=a-2

so a=3

Thank u very much

Ojash Verma - 2 years, 11 months ago

I reasoned the same way, it's so much simpler and neat than other ways

Silvia Franceschini - 1 year, 10 months ago
Leonhard Euler
Feb 13, 2020

We know a 1 mod ( a 1 ) a x 1 x mod ( a 1 ) \begin{aligned} a & \equiv 1\ \textrm{mod}\ (a-1)\\ \Rightarrow a^{x} & \equiv 1^{x}\ \textrm{mod}\ (a-1) \end{aligned} for all positive integers x x , and a 2 1 mod ( a 1 ) . \begin{aligned} a-2 & \equiv -1 \textrm{ mod}\ (a-1). \end{aligned} So the equation above reads 1 1 mod ( a 1 ) \begin{aligned} 1 & \equiv -1 \textrm{ mod}\ (a-1) \end{aligned} or 2 0 mod ( a 1 ) . \begin{aligned} 2 & \equiv 0 \textrm{ mod}\ (a-1). \end{aligned} This means 2 2 is divisible by a 1 a-1 , which is only true for a = 3 \boxed{a= 3} if we assume a > 2 a>2 .

It is the most simple solution in this thread.

Abhisruta Maity - 1 year ago

op solution

Rahul Katarki - 6 months ago
Conclaude Steviar
Oct 15, 2020

Subtracting 1 from both sides does not defy the congruence: a x 1 a 3 ( m o d ( a 1 ) ) a^x-1 \equiv a-3 \pmod{(a-1)} Now, since ( a 1 ) (a-1) is a factor of ( a x 1 x ) (a^x-1^x) : a 3 m o d ( a 1 ) = 0 a-3 \mod{(a-1)} = 0 This implies that a 3 a - 3 is congruent to a 1 a - 1 itself , since a 1 m o d ( a 1 ) = 0 a - 1 \mod{(a-1)} = 0 . It is clear then that the system cycles over a modulus of 2.

a 1 = 2 a-1 = 2 a = 3 \boxed{a=3}

Carsten Meyer
May 12, 2020

We notice " a 1 m o d a 1 a\equiv 1\mod a-1 " to simplify the congruence: 1 1 x a x a 2 1 2 1 m o d a 1 2 = 1 ( 1 ) = ! k ( a 1 ) , k Z \begin{aligned} 1&\equiv 1^x\equiv a^x\equiv a-2\equiv 1-2\equiv -1\mod a-1&&&\Leftrightarrow &&&& 2=1-(-1)&\overset{!}{=}k(a-1),&k\in\mathbb{Z} \end{aligned} We find a 1 a-1 must divide 2 2 , that is a 1 { ± 1 ; ± 2 } a-1\in\{\pm1;\:\pm2\} . With a > 2 a>2 , we only have one solution a = 3 a=\boxed{3}

Aman Mishra
Jun 5, 2018

Since nothing is mentioned about x except x >2 ,lets take a special case of x=3.Now according to question, a^3-a+2 must be perfectly divisible by (a-1) .So go for long division.2 will come at last and hence (a-1) must be 2 for a perfect division.Thus a=3!!!!

DarkMind S.
Aug 16, 2016

Just ask yourself, : "" Hmm, this looks like it could be Fermat's Little Theorem. What would be needed for it is be so ? "" Well, the right needs to equal 1.

Then you'll notice that the right side equals 1 if a = 3.

Then you will also notice that the modulus will equal 3 -1 = 2. So this means that P = 2.

Then you will also notice since x must be the same as P-1 , it means that x = 1. So we also got x !

Then we confirm this by noticing that

3^1 - 1 = 2. which gives an integer when divided by the modulus 2.

Done !

Saatvik Chugh
Jun 30, 2016
  • a^x is congruent to a-2 modulo (a-1)
  • a^x=-1 modulo(a-1)
  • a^x+1=0 modulo (a-1)
  • 1 + 1=0 modulo(a-1)
  • since a=1 modulo(a-1)
  • 2=0 modulo(a-1)
  • Therefore a-1 divides 2.
  • either a-1=1 (which gives a=2) or a-1=2(which gives a=3)
  • but it is given a and x are greater than 2.
  • Thus,The only solution is a=3.

I didn't something wrong and ended with an equation that validate (a) to be any integer I just want to understand my mistake, would someone tell me where is the wrong step? and why?

All your math is correct but your conclusion is wrong. Your last step (squaring) is not a bidirectional implication. So while a^x = -1 mod (a-1) does imply a^2x = 1 mod (a-1), the converse does not hold. Take a=4, x=3 for a counterexample. And thus you cannot draw the conclusion that just because any integer satisfies the last equality that it will also satisfy the first. Essentially, squaring led to loss of information.

Mathematically speaking the function f(k) = k^2 evaluated mod a-1 is not an injection for any a>3.

Roman Vaisberf - 5 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...