Post Reply 
Find number property and write RPL program (HP-49G,G+, HP 50g)
09-27-2014, 11:05 PM (This post was last modified: 09-27-2014 11:11 PM by Gerson W. Barbosa.)
Post: #21
RE: Find number property and write RPL program (HP-49G,G+, HP 50g)
%%HP: T(3)A(R)F(,);
\<< 1 { }
DO SWAP NEXTPRIME DUP DUP2 + 1 + ISPRIME? { UNROT + } { DROP SWAP } IFTE PICK3 OVER SIZE
UNTIL ==
END UNROT DROP2
\>>


%%HP: T(3)A(R)F(,);
\<< 1 { }
DO SWAP NEXTPRIME DUP DUP2 + 1 + ISPRIME? { UNROT + } { DROP SWAP } IFTE PICK3 PICK3
UNTIL \<=
END UNROT DROP2
\>>

%%HP: T(3)A(R)F(,);
\<< 2 * -1 -
\>>

PREVPRIME as the first instruction should be better and still less than 100-byte long.
Find all posts by this user
Quote this message in a reply
10-12-2014, 10:20 AM (This post was last modified: 10-12-2014 10:45 AM by Thomas Ritschel.)
Post: #22
RE: Find number property and write RPL program (HP-49G,G+, HP 50g)
Encouraged by Gerson's findings I was checking the serial numbers of quite a few bank notes and luckily also found two Sophie Germain primes (see attached image).

Surprisingly one of these numbers (the one on the 100 Euro note) is also a member of another special prime form.

Can you find it?

[Image: attachment.php?aid=1125]


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
10-12-2014, 12:50 PM (This post was last modified: 10-12-2014 12:52 PM by Gerson W. Barbosa.)
Post: #23
RE: Find number property and write RPL program (HP-49G,G+, HP 50g)
(10-12-2014 10:20 AM)Thomas Ritschel Wrote:  Encouraged by Gerson's findings I was checking the serial numbers of quite a few bank notes and luckily also found two Sophie Germain primes (see attached image).

Surprisingly one of these numbers (the one on the 100 Euro note) is also a member of another special prime form.

Can you find it?

Nice find! Twin primes are more rare than Sophie Germain primes. The one you've found belongs to both sets!

Twin primes are related to Brun's constant, to which I've found a remarkable approximation:

http://www.hpmuseum.org/cgi-sys/cgiwrap/...ead=236473
Find all posts by this user
Quote this message in a reply
10-12-2014, 03:15 PM
Post: #24
RE: Find number property and write RPL program (HP-49G,G+, HP 50g)
(10-12-2014 12:50 PM)Gerson W. Barbosa Wrote:  Nice find! Twin primes are more rare than Sophie Germain primes. The one you've found belongs to both sets!

Well, actually they should be of similar "rarity", with the twin primes slightly less rare than the Sophie Germains (e.g. from the prime number theorem it should follow a slightly higher chance for p+2 being prime than for 2p+1). Also compare the numbers given at the Top5000 primes pages:

http://primes.utm.edu/top20/page.php?id=1
http://primes.utm.edu/top20/page.php?id=2

But a number belonging to both sets is indeed even more rare!

So, what comes next? A Cunningham chain of 2nd kind, e.g. p and 2p-1 both prime, or, perhaps, a chain with more than two members? Let's check our wallets again... Smile

BTW.: That's a nice article on Brun's constant and it's computation!
Find all posts by this user
Quote this message in a reply
10-12-2014, 08:58 PM
Post: #25
RE: Find number property and write RPL program (HP-49G,G+, HP 50g)
(10-12-2014 03:15 PM)Thomas Ritschel Wrote:  Well, actually they should be of similar "rarity", with the twin primes slightly less rare than the Sophie Germains

It is quite possible that one is a finite set and the other not.
These are open conjectures, although both are believed to be infinite sets.


Pauli
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)