# Personal Blog

The Collatz conjecture, named after Lothar Collatz who introduced the idea is a perfect example of a mathematical problem that cannot be solved by mathematics and the tools available within the domain and scope of mathematics of today.

It goes a little like this:

$\left\f\left(n\right)=\left\{\begin\left\{cases\right\}\left\{\frac \left\{n\right\}\left\{2\right\}\right\}&\left\{\text\left\{if \right\}\right\}n\equiv 0\left\{\pmod \left\{2\right\}\right\}\\\left[4px\right]3n+1&\left\{\text\left\{if \right\}\right\}n\equiv 1\left\{\pmod \left\{2\right\}\right\}.\end\left\{cases\right\}\right\}\right\}$

it's a nice little conjecture to turn into a program, so I decided to write it in YASS to try and demonstrate this based on the above syntax:

YASS
function f ($n) if($n % 2 == 0)
$n =$n / 2
else
$n = ($n * 3) + 1
end if

return $n end function$n = input("Please insert a start number")

$iterations = 0 print($n)
while($n != 0 and$iterations < 5)

$n = f($n)

print($n) if($n == 1)
\$iterations++
end if
end while