Bitcoin Forum
November 07, 2024, 03:13:47 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Collatz conjecture or 3x+1 problem  (Read 261 times)
iamrohitkgupta (OP)
Newbie
*
Offline Offline

Activity: 44
Merit: 0


View Profile
November 22, 2016, 05:13:54 PM
Last edit: November 22, 2016, 07:35:43 PM by iamrohitkgupta
 #1

Quote
Conjecture:
Take any positive integer x. If x is even, divide it by 2(x/2). Else n is odd, multiply it by 3 and add 1(3*x+1). The conjecture is that no matter what number you start with, you will always eventually reach 1.
Eg:
10 is even 10/2 = 5 is odd 5*3+1 = 16 is even 16/2 = 8 is even 8/2 = 4 is even 4/2 = 2 is even 2/2 = 1 is odd 1*3+1 = 4 and the cycle continues.

I was Playing with Python and this problem.
I calculated the number up-to 10,485,760 which takes maximum steps to get to 1 :

Maximum Counts: 685(+/-1)
Even Counts: 429
Odd Counts: 256
Number with maximum Counts: 8400511

Not sure if this is correct.

Some time later I thought about trying negative numbers and I noticed 3 patterns:

pattern 0:

-2
-1

pattern 1:

-14
-7
-20
-10
-5

pattern 2:

-50
-25
-74
-37
-110
-55
-164
-82
-41
-122
-61
-182
-91
-272
-136
-68
-34
-17

Numbers from -1 to -16 either follow pattern 0 or pattern 1, but -17 on wards some of them follow pattern 2.
There might be other patterns too, but I haven't come across any, yet.
Has anyone (other than me) tried it?
arara
Member
**
Offline Offline

Activity: 97
Merit: 10

Tipsters Championship www.DirectBet.eu/Competition


View Profile
November 22, 2016, 05:18:54 PM
 #2

could not understand the problem Huh
iamrohitkgupta (OP)
Newbie
*
Offline Offline

Activity: 44
Merit: 0


View Profile
November 22, 2016, 05:29:41 PM
 #3

could not understand the problem Huh
Forgive me, I forgot to state the conjecture:
Take any positive integer x. If x is even, divide it by 2(x/2). Else n is odd, multiply it by 3 and add 1(3*x+1). The conjecture is that no matter what number you start with, you will always eventually reach 1.

Also updated the Original Post.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!