• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 04:08
CEST 10:08
KST 17:08
  • 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
BGE Stara Zagora 2025: Info & Preview27Code S RO12 Preview: GuMiho, Bunny, SHIN, ByuN3The Memories We Share - Facing the Final(?) GSL46Code S RO12 Preview: Cure, Zoun, Solar, Creator4[ASL19] Finals Preview: Daunting Task30
Community News
[BSL20] ProLeague: Bracket Stage & Dates8GSL Ro4 and Finals moved to Sunday June 15th12Weekly Cups (May 27-June 1): ByuN goes back-to-back0EWC 2025 Regional Qualifier Results26Code S RO12 Results + RO8 Groups (2025 Season 2)3
StarCraft 2
General
BGE Stara Zagora 2025: Info & Preview The SCII GOAT: A statistical Evaluation Magnus Carlsen and Fabi review Clem's chess game. Jim claims he and Firefly were involved in match-fixing GSL Ro4 and Finals moved to Sunday June 15th
Tourneys
Bellum Gens Elite: Stara Zagora 2025 Master Swan Open (Global Bronze-Master 2) $5,100+ SEL Season 2 Championship (SC: Evo) SOOPer7s Showmatches 2025 Cheeseadelphia 2025 - Open Bracket LAN!
Strategy
[G] Darkgrid Layout Simple Questions Simple Answers [G] PvT Cheese: 13 Gate Proxy Robo
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 476 Charnel House Mutation # 475 Hard Target Mutation # 474 Futile Resistance Mutation # 473 Cold is the Void
Brood War
General
Will foreigners ever be able to challenge Koreans? [BSL20] ProLeague: Bracket Stage & Dates BGH auto balance -> http://bghmmr.eu/ BW General Discussion I made an ASL quiz
Tourneys
[ASL19] Grand Finals [Megathread] Daily Proleagues [BSL20] ProLeague Bracket Stage - Day 2 [BSL20] ProLeague Bracket Stage - Day 1
Strategy
I am doing this better than progamers do. [G] How to get started on ladder as a new Z player
Other Games
General Games
Stormgate/Frost Giant Megathread What do you want from future RTS games? Path of Exile Nintendo Switch Thread Mechabellum
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
LiquidLegends to reintegrate into TL.net
Heroes of the Storm
Heroes of the Storm 2.0 Simple Questions, Simple Answers
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Vape Nation Thread European Politico-economics QA Mega-thread
Fan Clubs
Maru Fan Club Serral Fan Club
Media & Entertainment
Korean Music Discussion [Manga] One Piece
Sports
2024 - 2025 Football Thread Formula 1 Discussion NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Cleaning My Mechanical Keyboard
TL Community
The Automated Ban List
Blogs
Cognitive styles x game perf…
TrAiDoS
StarCraft improvement
iopq
Heero Yuy & the Tax…
KrillinFromwales
I was completely wrong ab…
jameswatts
Need Your Help/Advice
Glider
Trip to the Zoo
micronesia
Poker
Nebuchad
Customize Sidebar...

Website Feedback

Closed Threads



Active: 25519 users

Math puzzle #2

Blogs > LastPrime
Post a Reply
1 2 Next All
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 )!
1 2 Next All
Please log in or register to reply.
Live Events Refresh
Next event in 52m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
EnDerr 45
StarCraft: Brood War
Mong 967
Killer 471
Hyuk 424
TY 306
ggaemo 76
PianO 72
soO 60
Leta 55
Mind 49
Bale 4
Dota 2
XcaliburYe296
League of Legends
JimRising 691
Counter-Strike
Stewie2K1974
Heroes of the Storm
Khaldor237
Other Games
summit1g6332
shahzam901
Happy68
SC2_NightMare2
Organizations
StarCraft: Brood War
UltimateBattle 27
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 12 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• lizZardDota2185
League of Legends
• Stunt506
Upcoming Events
SOOP
52m
Classic vs GuMiho
Sparkling Tuna Cup
1h 52m
AllThingsProtoss
2h 52m
Fire Grow Cup
6h 52m
BSL: ProLeague
9h 52m
HBO vs Doodle
spx vs Tech
DragOn vs Hawk
Dewalt vs TerrOr
Replay Cast
15h 52m
Replay Cast
1d 15h
Replay Cast
2 days
WardiTV Invitational
2 days
WardiTV Invitational
2 days
[ Show More ]
GSL Code S
3 days
Rogue vs GuMiho
Maru vs Solar
Replay Cast
3 days
GSL Code S
4 days
herO vs TBD
Classic vs TBD
The PondCast
4 days
Replay Cast
4 days
GSL Code S
5 days
WardiTV Invitational
5 days
Korean StarCraft League
5 days
CranKy Ducklings
6 days
WardiTV Invitational
6 days
Cheesadelphia
6 days
Cheesadelphia
6 days
Liquipedia Results

Completed

CSL Season 17: Qualifier 1
BGE Stara Zagora 2025
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
KCM Race Survival 2025 Season 2
NPSL S3
Rose Open S1
CSL Season 17: Qualifier 2
2025 GSL S2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
ECL Season 49: Europe
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025
PGL Bucharest 2025
BLAST Open Spring 2025

Upcoming

CSL 17: 2025 SUMMER
Copa Latinoamericana 4
CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
K-Championship
SEL Season 2 Championship
Esports World Cup 2025
HSC XXVII
Championship of Russia 2025
Murky Cup #2
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
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.