Click here to Skip to main content
15,897,273 members
Home / Discussions / Algorithms
   

Algorithms

 
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 
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 
For p = 5, p^2 = 24 * 1 + 1

All primes > 5 have the form p = 30*k + l, where l is 1, 7, 11, 13, 17, 19, 23 or 29. All other values of l have a common factor > 1 with 30, and therefore cannot produce primes.

p^2 = 900*k^2 + 60*k*l + l^2

Rewrite the first 2 terms as 60*( 15*k^2 + k*l ). The sum in the parentheses is always even, so the entire expression is divisible by 24.

We are left with l^2. By inspection:

1^2 = 24 * 0 + 1
7^2 = 24 * 2 + 1
11^2 = 24 * 5 + 1
13^2 = 24 * 7 + 1
17^2 = 24 * 12 + 1
19^2 = 24 * 15 + 1
23^2 = 24 * 22 + 1
29^2 = 24 * 35 + 1

QED
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 
GeneralRe: image bounds after rotation Pin
Luc Pattyn3-Nov-10 11:10
sitebuilderLuc Pattyn3-Nov-10 11:10 
GeneralRe: image bounds after rotation Pin
Sauro Viti3-Nov-10 20:47
professionalSauro Viti3-Nov-10 20:47 
GeneralRe: image bounds after rotation Pin
harold aptroot3-Nov-10 21:40
harold aptroot3-Nov-10 21:40 
GeneralRe: image bounds after rotation Pin
Sauro Viti3-Nov-10 22:42
professionalSauro Viti3-Nov-10 22:42 
GeneralRe: image bounds after rotation Pin
Luc Pattyn4-Nov-10 2:50
sitebuilderLuc Pattyn4-Nov-10 2:50 
QuestionSimple Algebra Pin
mbadi24-Oct-10 22:59
mbadi24-Oct-10 22:59 

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.