• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 15:31
CET 21:31
KST 05:31
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Intel X Team Liquid Seoul event: Showmatches and Meet the Pros9[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3
Community News
Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win62025 RSL Offline Finals Dates + Ticket Sales!10BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION3Crank Gathers Season 2: SC II Pro Teams12Merivale 8 Open - LAN - Stellar Fest5
StarCraft 2
General
RotterdaM "Serral is the GOAT, and it's not close" Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win Weekly Cups (Oct 13-19): Clem Goes for Four DreamHack Open 2013 revealed Intel X Team Liquid Seoul event: Showmatches and Meet the Pros
Tourneys
Crank Gathers Season 2: SC II Pro Teams Merivale 8 Open - LAN - Stellar Fest SC4ALL $6,000 Open LAN in Philadelphia Kirktown Chat Brawl #9 $50 8:30PM EST 2025 RSL Offline Finals Dates + Ticket Sales!
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection Mutation # 495 Rest In Peace
Brood War
General
What's going on with b.net? Map pack for 3v3/4v4/FFA games BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion Ladder Map Matchup Stats
Tourneys
BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION [ASL20] Grand Finals Small VOD Thread 2.0 The Casual Games of the Week Thread
Strategy
How to stay on top of macro? PvZ map balance Current Meta Soma's 9 hatch build from ASL Game 2
Other Games
General Games
General RTS Discussion Thread Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread The Perfect Game
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Canadian Politics Mega-thread The Big Programming Thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! Korean Music Discussion Series you have seen recently...
Sports
MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion 2024 - 2026 Football Thread NBA General Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Challenge: Maths isn't all…
Hildegard
more word salad -- pay no h…
Peanutsc
Career Paths and Skills for …
TrAiDoS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1878 users

Math puzzle #2

Blogs > LastPrime
Post a Reply
Normal
LastPrime
Profile Blog Joined May 2010
United States109 Posts
Last Edited: 2010-09-10 01:42:33
September 09 2010 23:24 GMT
#1
Ok guys, the last puzzle was so easy my 7 year old sister could do it (it was her homework from her math class in kindergarten). Here's one for the grown ups:

Prove that for any positive integer d,there is an integer N for which d| 2^N+N. (means d divides 2^N+N evenly)


edit:
+ Show Spoiler +
Hint:
1) if gcd(2,n) = 1 then 2^(phi(n)) = 1 (mod n)
where phi(n) is the number of integers in {1,2,3,4,...n} that are relatively prime to n

2) Chinese remainder theorem


Hall of Fame
1. Steve496


Hidden_MotiveS
Profile Blog Joined February 2010
Canada2562 Posts
Last Edited: 2010-09-09 23:36:32
September 09 2010 23:29 GMT
#2
Spoilers+ Show Spoiler +
I give up


edit: working on it.
BottleAbuser
Profile Blog Joined December 2007
Korea (South)1888 Posts
Last Edited: 2010-09-10 00:11:28
September 09 2010 23:32 GMT
#3
Trivial solution: N = 0 works for all positive integers.

For powers of 2 (d = 2^k), d divides 2^k. It might not divide 2^k + k. However, we know that it divides all multiples of 2^k, including 2^(k+1), 2^(k+2), and so on, until we reach at most 2^(d). Then we know that d divides 2^d+d.


2^N % d = a.

Then 2^(N+1) % d = 2a % d
Then 2^(N+2) % d = 4a % d
And so on. If d is even, then eventually we'll find ka % d = 0, and multiples of that (N>k) can be used until the constant term +N comes around to a multiple of d.

time for classes... I'll give it another go later...
Compilers are like boyfriends, you miss a period and they go crazy on you.
Seth_
Profile Blog Joined July 2010
Belgium184 Posts
September 10 2010 00:38 GMT
#4
If d is even, then eventually we'll find ka % d = 0

d=6
start at N=2
2^2 % 6 = 4 = a
2^3 % 6 = 2
2^4 % 6 = 4
2^5 % 6 = 2
2^6 % 6 = 4
2^7 % 6 = 2
...
We'll never get to a 'k' for which ka%d=0
BottleAbuser
Profile Blog Joined December 2007
Korea (South)1888 Posts
Last Edited: 2010-09-10 01:03:21
September 10 2010 00:44 GMT
#5
I'm tempted to say that any loop is fine, because we're adding increments of 1 to the total modulus with each next term.

The point was that if 2^N % d = 0, then we can increment N until the remaining +N is also divisible by d.

If we can't increase 2^N to be divisible by d, then obviously we have entered a loop, over which we can keep increasing the remaining +N until the total is divisible by d.

If any loop is okay, then this should work for odd numbers as well.


====
to summarize

For any d, take an arbitrary N.

Let a = 2^N % d
Let b = N % d

If a + b = 0 or d, we are finished.

Now, we see if a * 2^k % d = 0 for any k. We need to increment k a maximum of d times before the modulus value begins looping or reaches 0.

In the case that it reaches 0, we only need to increment N a maximum of d more times before the value 2^N + N % d = 0.

In the case that it loops, we find the values of N where 2^(N+kb) % d = a. That is, the loop has a period of k numbers, and b is the number of total cycles. As long as k % d != 0, we can increment b until the constant added at the end matches up and the remainder becomes 0.

... I realize this still isn't proof to work for all numbers, just a lot of them...
Compilers are like boyfriends, you miss a period and they go crazy on you.
Exteray
Profile Blog Joined June 2007
United States1094 Posts
September 10 2010 01:32 GMT
#6
Need a hint... will Fermat's Little Theorem come in handy here?
BottleAbuser
Profile Blog Joined December 2007
Korea (South)1888 Posts
September 10 2010 01:39 GMT
#7
The proof for Fermat's Little Theorem looks like it could readily be adapted for this.
Compilers are like boyfriends, you miss a period and they go crazy on you.
LastPrime
Profile Blog Joined May 2010
United States109 Posts
Last Edited: 2010-09-10 01:42:47
September 10 2010 01:40 GMT
#8
Hint:
1) if gcd(2,n) = 1 then 2^(phi(n)) = 1 (mod n)
where phi(n) is the number of integers in {1,2,3,4,...n} that are relatively prime to n

2) Chinese remainder theorem

These are some of the standard tools for solving IMO-type problems.

Good luck!
Slithe
Profile Blog Joined February 2007
United States985 Posts
September 10 2010 01:59 GMT
#9
I kinda wanna take a crack at this problem, but it also kinda feels like I'm doing discrete math homework all over again.

I'll probably give it a bit of a shot and give up because I'm lame.
TanGeng
Profile Blog Joined January 2009
Sanya12364 Posts
September 10 2010 02:04 GMT
#10
I think we can start by looking when the modulus on 2^N repeats.

First start by expression d as
2^e * m where GCD(m, 2) = 1 and e is a non-negative integer
Candidate solutions will when N > e and is some multiple of 2^e. note GCD(m, 2^e) = 1

now when m = 1 we trivial solution
N = 2^e

by the Totient theorem will get repetitive modulo on phi(m)
because 2^phi(m) % m = 1
repetition is over values less than m and relatively prime to m (multiplied by 2^e)

Now for the totients:
for all primes t and positive integer n : phi(t^n) = t^(n-1)* (t-1)
for all positive integers p & q where GCD(p,q) = 1 : phi(p*q) = phi(p) * phi(q)

seems to get complicated from here on... hmmm
To be continued...
Moderator我们是个踏实的赞助商模式俱乐部
Slithe
Profile Blog Joined February 2007
United States985 Posts
September 10 2010 02:59 GMT
#11
I think I may have a solution for the odd numbers:

+ Show Spoiler +

for any odd d, N=d-1 will give us the desired result.

With the theorem that lastprime gave us, we see the following:
gcd(d,d-1) = 1
2^(d-1) = 1 mod d
2^(d-1) + d-1 = 0 mod d

I'm trying to use this to tackle the even numbers as well, with the idea that any even number d = c*(2^x). However, this is all pointless if my earlier conclusion is incorrect.
infinitestory
Profile Blog Joined April 2010
United States4053 Posts
September 10 2010 03:07 GMT
#12
I think this gets messy only because m could be even, which means we need to split into an odd case and an (even harder) even case, and phi(m) often shares factors with m, so looping by adding phi(m) isn't guaranteed to work.
Translator:3
Snuggles
Profile Blog Joined May 2010
United States1865 Posts
September 10 2010 03:11 GMT
#13
So are all of you guys math majors? This problem looks so intimidating I don't even want to touch it haha.
TanGeng
Profile Blog Joined January 2009
Sanya12364 Posts
Last Edited: 2010-09-10 03:24:49
September 10 2010 03:21 GMT
#14
On September 10 2010 11:59 Slithe wrote:
I think I may have a solution for the odd numbers:

+ Show Spoiler +

for any odd d, N=d-1 will give us the desired result.

With the theorem that lastprime gave us, we see the following:
gcd(d,d-1) = 1
2^(d-1) = 1 mod d
2^(d-1) + d-1 = 0 mod d

I'm trying to use this to tackle the even numbers as well, with the idea that any even number d = c*(2^x). However, this is all pointless if my earlier conclusion is incorrect.


Only true for prime numbers.

Even numbers aren't too bad. Just factor out the powers of 2 will be sufficient and that will reduce it to an odd number problem. Maybe I'm missing it but the non-prime odd values are the hardest part to solve.
Moderator我们是个踏实的赞助商模式俱乐部
Slithe
Profile Blog Joined February 2007
United States985 Posts
September 10 2010 03:37 GMT
#15
On September 10 2010 12:21 TanGeng wrote:
Show nested quote +
On September 10 2010 11:59 Slithe wrote:
I think I may have a solution for the odd numbers:

+ Show Spoiler +

for any odd d, N=d-1 will give us the desired result.

With the theorem that lastprime gave us, we see the following:
gcd(d,d-1) = 1
2^(d-1) = 1 mod d
2^(d-1) + d-1 = 0 mod d

I'm trying to use this to tackle the even numbers as well, with the idea that any even number d = c*(2^x). However, this is all pointless if my earlier conclusion is incorrect.


Only true for prime numbers.

Even numbers aren't too bad. Just factor out the powers of 2 will be sufficient and that will reduce it to an odd number problem. Maybe I'm missing it but the non-prime odd values are the hardest part to solve.


Oh I misread the theorem. Back to the drawing board...
mieda
Profile Blog Joined February 2010
United States85 Posts
Last Edited: 2010-09-10 19:18:27
September 10 2010 04:20 GMT
#16
If you need more hints let me know and I'll post some more hints here.

Edit: I suggested this problem to LastPrime for a little Math Puzzle Time in TL.net, so it'd defeat the purpose of me releasing my solution here. We'll post some harder ones once this is solved. Enjoy~

An easier version of this problem is the following: Every positive integer d divides 2^N - N for some N, in which case the idea of looking at cycles work, i.e. 2, 2^2, 2^(2^2), 2^(2^(2^2)), ... eventually becomes constant mod d for any positive integer d. In fact you can bound the cycle length, and get a rather nice expression for an explicit solution for N in terms of d.

Also, I'm on #math of efnet IRC and freenode, ID: hochs. If you want more lively math chat, I'm there and you can /msg me for some fun

Now back to preparing lecture notes for serre duality and its applications to riemann roch type theorems..
Steve496
Profile Joined July 2009
United States60 Posts
Last Edited: 2010-09-10 05:17:58
September 10 2010 05:17 GMT
#17
The solution is more or less obvious for powers of 2 and when d and phi(d) are relatively prime (which notably includes all primes). It's a little less clear to me how to extend the argument to deal with d and phi(d) having a common factor.

(As an aside, for those of you who like this sort of thing, I highly recommend Project Euler. Good times.)
Oracle
Profile Blog Joined May 2007
Canada411 Posts
September 10 2010 05:38 GMT
#18
Lol i had this EXACT problem in a Math 135 assignment at the university of waterloo last year
mieda
Profile Blog Joined February 2010
United States85 Posts
September 10 2010 05:40 GMT
#19
On September 10 2010 14:38 Oracle wrote:
Lol i had this EXACT problem in a Math 135 assignment at the university of waterloo last year


Oh, is that where it's from? ^^ It's a nice exercise in chinese remainder theorem
gondolin
Profile Blog Joined September 2007
France332 Posts
September 10 2010 06:30 GMT
#20
We may assume by the CRT that d=p^n, with p odd, the case p=2 being trivial.
Now by induction, there exist N such that 2^N+N=0 mod phi(d).
Write 2^N+N + k phi(d) =0.
Then 2^(N+k phi(d)) + (N + k phi(d)) = 2^N+N+k phi(d) = 0 mod p^n.
CQFD.


On September 10 2010 13:20 mieda wrote:
Now back to preparing lecture notes for serre duality and its applications to riemann roch type theorems..


Nice. Will you use it to prove the Hasse-Weil theorem on the zeta function of algebraic curve? From what I remember you can prove it without the classical proof from Weil with Jacobians by clever user of the Riemann-Roch (the hardest part being the Riemann hypothesis, with Jacobians you have the Rosati involution, here I don't remember how you do it).

By the way I infer from your signature that you are working on Complex Multiplication? That's one of the most beautiful area in Mathematics (according to Hilbert )!
Steve496
Profile Joined July 2009
United States60 Posts
September 10 2010 06:36 GMT
#21
Why does CRT force d=p^n?
mieda
Profile Blog Joined February 2010
United States85 Posts
Last Edited: 2010-09-10 06:54:09
September 10 2010 06:43 GMT
#22
On September 10 2010 15:30 gondolin wrote:
We may assume by the CRT that d=p^n, with p odd, the case p=2 being trivial.
Now by induction, there exist N such that 2^N+N=0 mod phi(d).
Write 2^N+N + k phi(d) =0.
Then 2^(N+k phi(d)) + (N + k phi(d)) = 2^N+N+k phi(d) = 0 mod p^n.
CQFD.


Show nested quote +
On September 10 2010 13:20 mieda wrote:
Now back to preparing lecture notes for serre duality and its applications to riemann roch type theorems..


Nice. Will you use it to prove the Hasse-Weil theorem on the zeta function of algebraic curve? From what I remember you can prove it without the classical proof from Weil with Jacobians by clever user of the Riemann-Roch (the hardest part being the Riemann hypothesis, with Jacobians you have the Rosati involution, here I don't remember how you do it).

By the way I infer from your signature that you are working on Complex Multiplication? That's one of the most beautiful area in Mathematics (according to Hilbert )!


Riemann Roch is useful for just about everything involving curves (ofc there is an analogue for surfaces.. but the formulas get nasty when dimensions rise)! I'm preparing the notes as a background for students who are starting to count dimensions of automorphic forms of various weights. They'll need to know some dimension theory on the complex surfaces formed from congruence subgroups, and that's just riemann roch ^^. Actually you don't need serre duality for proof of riemann roch theorems, especially if one is only working over the complexes, but the idea is nice enough

I'm not really working on complex multiplication per se. That's more lower dimension (i.e. elliptic curves). Of course there are analogues for higher dimensional abelian varieties, but the thing I work on is nice combinatorial descriptions (if I can!) of cohomology of rapoport-zink spaces.

Also, you should probably fill in more detail for reduction to d = p^n case. Chinese Remainder Theorem directly doesn't apply, as you will see. The problem is that the modulus are not pair-wise coprime when you apply it directly. But it just takes a little more work to get it to work.

Are you working on math also?
mieda
Profile Blog Joined February 2010
United States85 Posts
Last Edited: 2010-09-10 06:51:59
September 10 2010 06:44 GMT
#23
On September 10 2010 15:36 Steve496 wrote:
Why does CRT force d=p^n?


It doesn't, not directly at least. You still need to work a little bit to reduce to the d = p^n case. The moduli are not pair-wise coprime when you try to apply it directly, but just takes a little more massage to get it to work.
mieda
Profile Blog Joined February 2010
United States85 Posts
Last Edited: 2010-09-10 06:58:29
September 10 2010 06:55 GMT
#24
+ Show Spoiler +
Solution


Other nice problem
gondolin
Profile Blog Joined September 2007
France332 Posts
September 10 2010 07:50 GMT
#25
On September 10 2010 15:43 mieda wrote:
Show nested quote +
On September 10 2010 15:30 gondolin wrote:
We may assume by the CRT that d=p^n, with p odd, the case p=2 being trivial.
Now by induction, there exist N such that 2^N+N=0 mod phi(d).
Write 2^N+N + k phi(d) =0.
Then 2^(N+k phi(d)) + (N + k phi(d)) = 2^N+N+k phi(d) = 0 mod p^n.
CQFD.


On September 10 2010 13:20 mieda wrote:
Now back to preparing lecture notes for serre duality and its applications to riemann roch type theorems..


Nice. Will you use it to prove the Hasse-Weil theorem on the zeta function of algebraic curve? From what I remember you can prove it without the classical proof from Weil with Jacobians by clever user of the Riemann-Roch (the hardest part being the Riemann hypothesis, with Jacobians you have the Rosati involution, here I don't remember how you do it).

By the way I infer from your signature that you are working on Complex Multiplication? That's one of the most beautiful area in Mathematics (according to Hilbert )!


Riemann Roch is useful for just about everything involving curves (ofc there is an analogue for surfaces.. but the formulas get nasty when dimensions rise)! I'm preparing the notes as a background for students who are starting to count dimensions of automorphic forms of various weights. They'll need to know some dimension theory on the complex surfaces formed from congruence subgroups, and that's just riemann roch ^^. Actually you don't need serre duality for proof of riemann roch theorems, especially if one is only working over the complexes, but the idea is nice enough


Yes, the "nice" generalisation is Grothendieck-Riemann-Roch, but it is harder to expose
(But I still find it beautiful that Riemann-Roch is a relative theorem)


I'm not really working on complex multiplication per se. That's more lower dimension (i.e. elliptic curves). Of course there are analogues for higher dimensional abelian varieties, but the thing I work on is nice combinatorial descriptions (if I can!) of cohomology of rapoport-zink spaces.


Well Complex Multiplication on elliptic curves is known since Kronecker. (The fact that the j-invariant give the Hilbert class field of Imaginary Quadratic fields). The work of Shimura was to generalize this to abelian varieties. (The modular invariants of an abelian variety with CM by K lies in the Hilbert class field of the reflex field + the reciprocity law expressing the action of the Galois group in term of the type norm of the ideals of the reflex field.)


Also, you should probably fill in more detail for reduction to d = p^n case. Chinese Remainder Theorem directly doesn't apply, as you will see. The problem is that the modulus are not pair-wise coprime when you apply it directly. But it just takes a little more work to get it to work.

Are you working on math also?


Yeah that's true, you need to keep track of the congruent relations of the N_i solution for p_i to verify you can "glue" the solutions. (That's funny how the point of view change, before I thought of the CRT as an arithmetic statement, now when I think about it I visualize it as local sections over Spec(Z/NZ) that we try to glue).

I have a background in mathematics, but now I am working on computer science By the way I see that you are from Harvard. Do you know Sophie Morel? She attended the same "college" as me and is very good
mieda
Profile Blog Joined February 2010
United States85 Posts
Last Edited: 2010-09-10 08:21:41
September 10 2010 07:55 GMT
#26

Yeah that's true, you need to keep track of the congruent relations of the N_i solution for p_i to verify you can "glue" the solutions. (That's funny how the point of view change, before I thought of the CRT as an arithmetic statement, now when I think about it I visualize it as local sections over Spec(Z/NZ) that we try to glue).


Yea, that's actually a nice way to visualize it.


I have a background in mathematics, but now I am working on computer science By the way I see that you are from Harvard. Do you know Sophie Morel? She attended the same "college" as me and is very good



Oh good. Yes, of course I know Sophie Morel, she's a new professor here. But I don't see her here nowadays. I presume she's visiting IAS now with the big number theory thing going on there this year.

It's interesting to see another person who did math in TL.net ^^.
gondolin
Profile Blog Joined September 2007
France332 Posts
September 10 2010 08:21 GMT
#27

It's interesting to see another person who did math in TL.net ^^. Did you play SC also?


There is a user (Muirhead I think) that is also doing math (he works on algebraic geometry in MIT).
Yeah I discovered SC when I went to the "college" I mentioned. I played warcraft 3 before, but once I discovered SC i switched
Ivs
Profile Joined January 2008
Australia139 Posts
September 10 2010 12:08 GMT
#28
There is a generalisation to this:
Fixing any a, d, k, and gcd(d,k)=1
ka^x = x mod d
always has infinitely many solutions x.

Proof:
+ Show Spoiler +

let x=ka^y mod d
then all we need to do is to find infinitely many y satisfying
a^(ka^y) = a^y mod d
But since for any a, powers of a in mod d eventually cycles in period phi(d), it is sufficient to find infinitely many solutions to
ka^y = y mod phi(d)
now phi(d)<d so this is the same problem in a smaller mod. The result is certain true for d=1, induction cleans up the rest.


Setting a=2, k=-1 solves your question =).
Plexa
Profile Blog Joined October 2005
Aotearoa39261 Posts
September 10 2010 13:04 GMT
#29
On September 10 2010 17:21 gondolin wrote:
Show nested quote +

It's interesting to see another person who did math in TL.net ^^. Did you play SC also?


There is a user (Muirhead I think) that is also doing math (he works on algebraic geometry in MIT).
Yeah I discovered SC when I went to the "college" I mentioned. I played warcraft 3 before, but once I discovered SC i switched

And I just finished my undergrad in Math! Yay! Now doing some work in Topology :3
Administrator~ Spirit will set you free ~
mieda
Profile Blog Joined February 2010
United States85 Posts
Last Edited: 2010-09-10 15:24:09
September 10 2010 15:23 GMT
#30
On September 10 2010 21:08 Ivs wrote:
There is a generalisation to this:
Fixing any a, d, k, and gcd(d,k)=1
ka^x = x mod d
always has infinitely many solutions x.

Proof:
+ Show Spoiler +

let x=ka^y mod d
then all we need to do is to find infinitely many y satisfying
a^(ka^y) = a^y mod d
But since for any a, powers of a in mod d eventually cycles in period phi(d), it is sufficient to find infinitely many solutions to
ka^y = y mod phi(d)
now phi(d)<d so this is the same problem in a smaller mod. The result is certain true for d=1, induction cleans up the rest.


Setting a=2, k=-1 solves your question =).


The problem is that x = ka^y mod d doesn't imply a^(ka^y) = a^x (mod d).
Ivs
Profile Joined January 2008
Australia139 Posts
Last Edited: 2010-09-10 16:07:47
September 10 2010 15:55 GMT
#31
On September 11 2010 00:23 mieda wrote:
Show nested quote +
On September 10 2010 21:08 Ivs wrote:
There is a generalisation to this:
Fixing any a, d, k, and gcd(d,k)=1
ka^x = x mod d
always has infinitely many solutions x.

Proof:
+ Show Spoiler +

let x=ka^y mod d
then all we need to do is to find infinitely many y satisfying
a^(ka^y) = a^y mod d
But since for any a, powers of a in mod d eventually cycles in period phi(d), it is sufficient to find infinitely many solutions to
ka^y = y mod phi(d)
now phi(d)<d so this is the same problem in a smaller mod. The result is certain true for d=1, induction cleans up the rest.


Setting a=2, k=-1 solves your question =).


The problem is that x = ka^y mod d doesn't imply a^(ka^y) = a^x (mod d).


I didn't say it implies, rather, it is suffice to solve the second equation to obtain a solution to the first.

edit: More specifically,
If x = ka^y, then
ka^x = x mod d if and only if a^(ka^y) = a^y mod d
mieda
Profile Blog Joined February 2010
United States85 Posts
Last Edited: 2010-09-10 19:55:57
September 10 2010 17:07 GMT
#32
On September 11 2010 00:55 Ivs wrote:
Show nested quote +
On September 11 2010 00:23 mieda wrote:
On September 10 2010 21:08 Ivs wrote:
There is a generalisation to this:
Fixing any a, d, k, and gcd(d,k)=1
ka^x = x mod d
always has infinitely many solutions x.

Proof:
+ Show Spoiler +

let x=ka^y mod d
then all we need to do is to find infinitely many y satisfying
a^(ka^y) = a^y mod d
But since for any a, powers of a in mod d eventually cycles in period phi(d), it is sufficient to find infinitely many solutions to
ka^y = y mod phi(d)
now phi(d)<d so this is the same problem in a smaller mod. The result is certain true for d=1, induction cleans up the rest.


Setting a=2, k=-1 solves your question =).


The problem is that x = ka^y mod d doesn't imply a^(ka^y) = a^x (mod d).


I didn't say it implies, rather, it is suffice to solve the second equation to obtain a solution to the first.

edit: More specifically,
If x = ka^y, then
ka^x = x mod d if and only if a^(ka^y) = a^y mod d


Sure, but when k < 0 you're raising a to a negative power. For example in our case a = 2 and k = -1, you're saying -2^x = x (mod d) iff 2^(-2^y) = 2^y mod d, and how will you interpret 2^(-2^y) ? it's not an integer.

Also, in your original proof you wrote x = ka^y (mod d), thus sufficient to solve a^(ka^y) = a^y mod d, from which I thought that you seemed to be saying that if x = ka^y (mod d) then a^x = a^(ka^y) mod d, which isn't true.

Remark: When k > 0, the remark I made earlier in this thread is exactly this method. This solution doesn't seem to work, because we have k < 0 now. I made the remark that when we have to solve 2^N = N (mod d) and not 2^N = -N (mod d), then it's a bit easier.

Edit: There is a way to fix this argument, and that is to choose k so that gcd(d,k) = 1 and k > 0 by adding d to it sufficient number of times.
KristianJS
Profile Joined October 2009
2107 Posts
September 10 2010 17:23 GMT
#33
This exercise taught me a useful lesson in how the normal conditions given for CRT are stronger than necessary
You need to be 100% behind someone before you can stab them in the back
mieda
Profile Blog Joined February 2010
United States85 Posts
September 10 2010 19:06 GMT
#34
On September 11 2010 02:23 KristianJS wrote:
This exercise taught me a useful lesson in how the normal conditions given for CRT are stronger than necessary


The exercise has served its purpose!

Ivs
Profile Joined January 2008
Australia139 Posts
September 11 2010 02:30 GMT
#35
On September 11 2010 02:07 mieda wrote:
Show nested quote +
On September 11 2010 00:55 Ivs wrote:
On September 11 2010 00:23 mieda wrote:
On September 10 2010 21:08 Ivs wrote:
There is a generalisation to this:
Fixing any a, d, k, and gcd(d,k)=1
ka^x = x mod d
always has infinitely many solutions x.

Proof:
+ Show Spoiler +

let x=ka^y mod d
then all we need to do is to find infinitely many y satisfying
a^(ka^y) = a^y mod d
But since for any a, powers of a in mod d eventually cycles in period phi(d), it is sufficient to find infinitely many solutions to
ka^y = y mod phi(d)
now phi(d)<d so this is the same problem in a smaller mod. The result is certain true for d=1, induction cleans up the rest.


Setting a=2, k=-1 solves your question =).


The problem is that x = ka^y mod d doesn't imply a^(ka^y) = a^x (mod d).


I didn't say it implies, rather, it is suffice to solve the second equation to obtain a solution to the first.

edit: More specifically,
If x = ka^y, then
ka^x = x mod d if and only if a^(ka^y) = a^y mod d


Sure, but when k < 0 you're raising a to a negative power. For example in our case a = 2 and k = -1, you're saying -2^x = x (mod d) iff 2^(-2^y) = 2^y mod d, and how will you interpret 2^(-2^y) ? it's not an integer.

Also, in your original proof you wrote x = ka^y (mod d), thus sufficient to solve a^(ka^y) = a^y mod d, from which I thought that you seemed to be saying that if x = ka^y (mod d) then a^x = a^(ka^y) mod d, which isn't true.

Remark: When k > 0, the remark I made earlier in this thread is exactly this method. This solution doesn't seem to work, because we have k < 0 now. I made the remark that when we have to solve 2^N = N (mod d) and not 2^N = -N (mod d), then it's a bit easier.

Edit: There is a way to fix this argument, and that is to choose k so that gcd(d,k) = 1 and k > 0 by adding d to it sufficient number of times.


I did impose gcd(d,k) = 1, read the whole thing =P. You are right about the negative part though, and yup it is easily fixed.
mieda
Profile Blog Joined February 2010
United States85 Posts
September 11 2010 02:36 GMT
#36

I did impose gcd(d,k) = 1, read the whole thing =P. You are right about the negative part though, and yup it is easily fixed.


I read the whole thing. Only the $k > 0$ is meant to be new. You should read my last sentencen as "gcd(d,k) = 1" *and also* "k > 0"

Ivs
Profile Joined January 2008
Australia139 Posts
September 11 2010 02:43 GMT
#37
On September 11 2010 11:36 mieda wrote:
Show nested quote +

I did impose gcd(d,k) = 1, read the whole thing =P. You are right about the negative part though, and yup it is easily fixed.


I read the whole thing. Only the $k > 0$ is meant to be new. You should read my last sentencen as "gcd(d,k) = 1" *and also* "k > 0"


Oh right, fair enough (=.
Normal
Please log in or register to reply.
Live Events Refresh
SC4ALL
15:00
Day 2
Artosis1132
LiquipediaDiscussion
SC4ALL
15:00
SC4ALL - Day 2
TriGGeR vs Mixu
Percival vs TBD
RotterdaM898
ComeBackTV 582
IndyStarCraft 194
CranKy Ducklings129
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 898
IndyStarCraft 194
CosmosSc2 114
BRAT_OK 57
Railgan 46
ProTech46
Nathanias 22
JuggernautJason18
StarCraft: Brood War
ZZZero.O 100
Dota 2
Fuzer 296
monkeys_forever123
LuMiX1
Counter-Strike
byalli708
Heroes of the Storm
Liquid`Hasu361
Khaldor207
Other Games
Grubby1820
FrodaN1311
qojqva1240
Artosis1132
B2W.Neo865
ScreaM854
Beastyqt774
fl0m374
mouzStarbuck192
QueenE90
Organizations
Other Games
gamesdonequick1666
Counter-Strike
PGL398
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 20 non-featured ]
StarCraft 2
• StrangeGG 55
• Hupsaiya 42
• Adnapsc2 24
• Legendk 2
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• Migwel
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• HerbMon 13
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV458
• Ler108
Other Games
• imaqtpie1541
• Scarra346
• Shiphtur224
Upcoming Events
Replay Cast
12h 30m
Wardi Open
15h 30m
Monday Night Weeklies
20h 30m
Replay Cast
1d 2h
Sparkling Tuna Cup
1d 13h
WardiTV Korean Royale
1d 15h
LAN Event
1d 18h
Replay Cast
2 days
WardiTV Korean Royale
2 days
LAN Event
2 days
[ Show More ]
OSC
3 days
The PondCast
3 days
LAN Event
3 days
Replay Cast
4 days
LAN Event
4 days
Korean StarCraft League
5 days
CranKy Ducklings
5 days
WardiTV Korean Royale
5 days
LAN Event
5 days
IPSL
5 days
dxtr13 vs OldBoy
Napoleon vs Doodle
Replay Cast
6 days
Sparkling Tuna Cup
6 days
WardiTV Korean Royale
6 days
LAN Event
6 days
IPSL
6 days
JDConan vs WIZARD
WolFix vs Cross
Liquipedia Results

Completed

CSL 2025 AUTUMN (S18)
CranK Gathers Season 2: SC II Pro Teams
Eternal Conflict S1

Ongoing

BSL 21 Points
BSL 21 Team A
C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
SC4ALL: Brood War
SC4ALL: StarCraft II
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025

Upcoming

YSL S2
BSL Season 21
SLON Tour Season 2
BSL 21 Non-Korean Championship
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
Stellar Fest
META Madness #9
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.