Collatz Conjecture

You may also like...

4 Responses

  1. Mike says:

    Brian Hayes has a nice account on his blog. I hadn’t seen the Kakutani quote before.

  2. Bob says:

    It doesn’t work in matlab for some reason. :/

  3. Mike Garrity says:

    That function returns the series generated from a seed. The series A008908 is the number of values in the series starting with different numbers. So to generate the first 10,000 values of A008908, you would use the collatz function like so:

    npts=1e4;
    c=zeros(1,npts);
    for i=1:npts
    c(i) = numel(collatz(i));
    end
    plot(c)

Leave a Reply to Mike Cancel reply

Your email address will not be published. Required fields are marked *