All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Getting Primed With Subtraction And Addition (Posted on 2007-12-26) Difficulty: 2 of 5
Determine all possible primes p such that each of p-8, p-4, p+8 and p+12 are also primes.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts computer exploration (spoiler) | Comment 1 of 5

The P in the following program is 8 lower than the p of the puzzle, and tests P+4, P+8 (the original p of the puzzle), P+16 and P+20 for primality, and finds only P=3 (puzzle's original p=11) when testing all P through 131,708,999, at which point it was manually interrupted.

list
   10   loop
   15    Pp=P
   20    P=nxtprm(P)
   30    if prmdiv(P+4)=P+4 then
   40      :if prmdiv(P+8)=P+8 then
   50          :if prmdiv(P+16)=P+16 then
   60              :if prmdiv(P+20)=P+20 then
   70                  :print P;P+4;P+8;P+16;P+20
   75   if P=0 then goto 100
   80   endloop
  100   print Pp
OK
asave "5primes"
OK
run
 3  7  11  19  23
Break in 20
?p,pp
 131709001       131708999
OK

  Posted by Charlie on 2007-12-26 11:59:39
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (13)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information