Live data from Hacker News

The 3x+1 Problem [video]

youtube.com

11–20 of 102 posts

Re: The 3x+1 Problem [video]

#13
post #5

After watching this video, how many of us wrote a program to see if we could just randomly find a case which didn't converge? I wrote one, but of course, the program didn't prove the 3x+1 problem wrong.

[deleted]

Re: The 3x+1 Problem [video]

#14
This video severely disrupted my sleep yesterday.

Whole night I was thinking and dreaming about this darned thing, even though I knew it was pretty pointless to do so, considering I'm not even a mathematician and have always found maths hard.

Still a brilliant video and now I get why people could spend 20+ years of their precious lives trying to solve these things.

Re: The 3x+1 Problem [video]

#16

This video severely disrupted my sleep yesterday. Whole night I was thinking and dreaming about this darned thing, even though I knew it was pretty pointless to do so, considering I'm not even a mathematician and have always found maths hard. Still a brilliant video and now I get why people could spend 20+ years of their precious lives trying to solve these things.

and why do they do that?

Re: The 3x+1 Problem [video]

#17
post #5

After watching this video, how many of us wrote a program to see if we could just randomly find a case which didn't converge? I wrote one, but of course, the program didn't prove the 3x+1 problem wrong.

People have been brute forcing the Collatz problem for awhile (up to values around 2.95×10^20); just like computing Pi to set glory records, you have to be prepared to rent Amazon hardware. I think there was a proof that demonstrated that if the Collatz conjecture were false, then the cycle has to be immensely large.

Re: The 3x+1 Problem [video]

#18
post #5

After watching this video, how many of us wrote a program to see if we could just randomly find a case which didn't converge? I wrote one, but of course, the program didn't prove the 3x+1 problem wrong.

I know so little about programming but this video absolutely left me up late trying to follow along:

    $count = 1
    do {
        $count++
        $i = $count
        [string]$array = "$i"
        $range = $i - 1
            do {
                if ($i % 2 -eq 0) {$i = $i / 2} else {$i = (3 \* $i) + 1} 
                $array = "$array" + ",$i"
                if ($i - $count -gt $range) {$range = $i - $count}
                if ($i -eq 2) {$i = "Break"}
                } while ($i -ne "Break")
            $array = "$array" + ",1"
            $hits = (($array -split ",") | Measure-Object).count
            Set-Content -Path "${count}_${hits}Hits_${range}MaxRange.txt" -Value "$array" -NoNewline -Force
        } while ($count -lt 1000)
Does anyone know how to make this work with big numbers? At a certain point the value gets returned with something like 2.05891132094649E+44 at which point I can no longer simply add 1 to it.

Edit: Found it... $count = [bigint][math]::pow(10,44) Awesome! I love code!

Post reply on HN