January 2011
5 posts
my most recent composition
collatz<-
function (y)
{while (y[length(y)]!=1){
if (y[length(y)]/2==floor(y[length(y)]/2)){
y<-rbind(y,y[length(y)]/2)}
else{
y<-rbind(y,3*y[length(y)]+1)}
}
t(y)
}
to help me prove this:http://en.wikipedia.org/wiki/Collatz_conjecture