Click here to Skip to main content
15,900,325 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: TIL...... Pin
Luc Pattyn4-Nov-10 4:56
sitebuilderLuc Pattyn4-Nov-10 4:56 
GeneralRe: TIL...... Pin
NeverHeardOfMe4-Nov-10 5:18
NeverHeardOfMe4-Nov-10 5:18 
AnswerRe: TIL...... Pin
Luc Pattyn4-Nov-10 6:10
sitebuilderLuc Pattyn4-Nov-10 6:10 
GeneralRe: TIL...... Pin
NeverHeardOfMe4-Nov-10 6:39
NeverHeardOfMe4-Nov-10 6:39 
GeneralRe: TIL...... Pin
redbones10-Nov-10 1:03
redbones10-Nov-10 1:03 
AnswerRe: TIL...... Pin
Luc Pattyn4-Nov-10 4:58
sitebuilderLuc Pattyn4-Nov-10 4:58 
GeneralRe: TIL...... Pin
NeverHeardOfMe4-Nov-10 5:23
NeverHeardOfMe4-Nov-10 5:23 
AnswerRe: TIL...... PinPopular
_Erik_4-Nov-10 6:53
_Erik_4-Nov-10 6:53 
Well, I know you are not asking for a mathematical proof, but like I am much better at maths than metaphisics...

Where does 24 come from?

Since p is prime and greater than 5, p cannot be an even number. So:

p2-1=(p-1)*(p+1).

Like p is odd, both (p-1) and (p+1) are even, so we can say:

p2-1=2a*2b=4ab.

Like (p-1) and (p+1) are two consecutive even numbers, one of them must be multiple of 4, so 2a is multiple of 4 or 2b is multiple of 4, so we can express this like:

p2-1=4a*2c=8ac
or
p2-1=4b*2d=8bd

I will examine just one of these two cases becouse they are symmetrical. Now, like (p-1) and (p+1) are two consecutive even numbers, one of them must be multiple of 3, so:

p2-1=8a*3d=24ad
or
p2-1=8c*3e=24ce

And there it is.
GeneralRe: TIL...... Pin
NeverHeardOfMe4-Nov-10 7:20
NeverHeardOfMe4-Nov-10 7:20 
GeneralRe: TIL...... Pin
_Erik_4-Nov-10 7:27
_Erik_4-Nov-10 7:27 
GeneralRe: TIL...... Pin
NeverHeardOfMe4-Nov-10 7:30
NeverHeardOfMe4-Nov-10 7:30 
GeneralRe: TIL...... Pin
MarkLoboo9-Nov-10 22:51
MarkLoboo9-Nov-10 22:51 
AnswerRe: TIL...... Pin
dbaechtel10-Nov-10 2:24
professionaldbaechtel10-Nov-10 2:24 
AnswerRe: TIL...... Pin
Daniel Pfeffer10-Nov-10 8:33
professionalDaniel Pfeffer10-Nov-10 8:33 
GeneralRe: TIL...... Pin
NeverHeardOfMe10-Nov-10 11:10
NeverHeardOfMe10-Nov-10 11:10 
GeneralRe: TIL...... Pin
Daniel Pfeffer10-Nov-10 18:05
professionalDaniel Pfeffer10-Nov-10 18:05 
GeneralRe: TIL...... (better proof) Pin
Daniel Pfeffer10-Nov-10 18:33
professionalDaniel Pfeffer10-Nov-10 18:33 
AnswerRe: TIL...... Pin
Michael Waters10-Nov-10 10:49
Michael Waters10-Nov-10 10:49 
AnswerRe: TIL...... Pin
cp987610-Nov-10 14:16
cp987610-Nov-10 14:16 
JokeThe full truth is 84. Pin
Bernhard Hiller25-Nov-10 22:32
Bernhard Hiller25-Nov-10 22:32 
JokeMore false idols Pin
cp987627-Nov-10 0:13
cp987627-Nov-10 0:13 
AnswerRe: TIL...... Pin
dpminusa10-Nov-10 14:54
dpminusa10-Nov-10 14:54 
Questionimage bounds after rotation Pin
mehdi001628-Oct-10 11:14
mehdi001628-Oct-10 11:14 
AnswerRe: image bounds after rotation [modified] PinPopular
Luc Pattyn28-Oct-10 11:39
sitebuilderLuc Pattyn28-Oct-10 11:39 
GeneralRe: image bounds after rotation Pin
Sauro Viti3-Nov-10 10:51
professionalSauro Viti3-Nov-10 10:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.