Post Reply 
(12C) 3n + 1 conjecture
07-07-2018, 02:24 PM
Post: #11
RE: (12C) 3n + 1 conjecture
(07-07-2018 07:36 AM)Dieter Wrote:  
(07-06-2018 09:50 PM)Joe Horn Wrote:  I'm not familiar with programing the 12C, but perhaps the following "trick" can be used to shrink the program even further. The following sequence changes any even X to X/2, and any odd X to (3X+1)/2, which is valid for this conjecture since 3*odd+1 is always an even number.

OK, but if you want to show the complete sequence (both x/2 and 3x+1) two more steps are required...

Ah, but the OP did not state that the entire sequence needs to be displayed, but rather only that the conjecture be tested.

(07-07-2018 08:37 AM)Thomas Klemm Wrote:  In this case we can use this short and very fast program instead:
Code:
01   1

Heh heh! Cute, but it does not actually do what the OP requested, which is test the conjecture. The following program does so, and is shorter and faster than the programs above. You might be thinking, "But if not displaying the 3X+1 terms in the sequence can be tolerated, then why not just eliminate the PSE entirely, reducing the program to 15 steps? This would still test the hypothesis, and run MUCH faster, but it would be really boring to watch!" To which I would reply, "Quite right."

Code:
01 ENTER
02 ENTER
03 2
04 /
05 ENTER
06 FRAC
07 X=0
08 GTO 10
09 +
10 +
11 PSE
12 1
13 X<>Y
14 X<=Y
15 GTO 00
16 GTO 01

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C) 3n + 1 conjecture - Gamo - 07-06-2018, 10:16 AM
RE: (12C) 3n + 1 conjecture - Thomas Klemm - 07-06-2018, 06:59 PM
RE: (12C) 3n + 1 conjecture - Dieter - 07-06-2018, 07:25 PM
RE: (12C) 3n + 1 conjecture - Dieter - 07-06-2018, 07:13 PM
RE: (12C) 3n + 1 conjecture - Joe Horn - 07-06-2018, 09:50 PM
RE: (12C) 3n + 1 conjecture - Dieter - 07-07-2018, 07:36 AM
RE: (12C) 3n + 1 conjecture - Thomas Klemm - 07-06-2018, 10:31 PM
RE: (12C) 3n + 1 conjecture - Joe Horn - 07-07-2018, 03:10 AM
RE: (12C) 3n + 1 conjecture - Gamo - 07-07-2018, 01:51 AM
RE: (12C) 3n + 1 conjecture - Thomas Klemm - 07-07-2018, 08:37 AM
RE: (12C) 3n + 1 conjecture - Joe Horn - 07-07-2018 02:24 PM
RE: (12C) 3n + 1 conjecture - Dieter - 07-07-2018, 04:57 PM
RE: (12C) 3n + 1 conjecture - Joe Horn - 07-07-2018, 07:04 PM



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