--- a/core_testing1/collatz.scala Mon Nov 08 00:17:50 2021 +0000
+++ b/core_testing1/collatz.scala Mon Nov 08 01:03:09 2021 +0000
@@ -1,4 +1,4 @@
-// Basic Part about the 3n+1 conjecture
+// Core Part 1 about the 3n+1 conjecture
//==================================
// generate jar with
@@ -18,8 +18,7 @@
}
//collatz_max(1000000)
-//collatz_max(10000000)
-//collatz_max(100000000)
+
/* some test cases
val bnds = List(10, 100, 1000, 10000, 100000, 1000000)
@@ -31,6 +30,7 @@
*/
+
def is_pow(n: Long) : Boolean = (n & (n - 1)) == 0
def is_hard(n: Long) : Boolean = is_pow(3 * n + 1)
@@ -41,6 +41,7 @@
last_odd(3 * n + 1)
+
//for (i <- 130 to 10000) println(s"$i: ${last_odd(i)}")
//for (i <- 1 to 100) println(s"$i: ${collatz(i)}")