Computing large integers with matlab.

I want to compute the collatz sequence $(n,T(n),T^2(n),\dots)$

for $$n= 100\cdot \left \lfloor {\pi \cdot 10^{35}}\right \rfloor$$ with

$$T(n) = \begin{cases} \frac{3n + 1}{2} & \text{ if n odd} \\ \frac{n}{2} & \text{ if n even} \end{cases}$$ This sequence was computed before and is 529 steps long (i.e. $T^{529}(n)=1$).

If I compute it with Matlab, I have the feeling that he rounds up numbers which changes the exact sequence. My computed sequence is only 297 steps long. Is it possible to compute such a trajectory with Matlab?

• I believe Matlab has a computer algebra toolbox based on MuPad (MathWorks bought MuPad in 2008, probably to replace the preceding CAS toolbox which was based on Maple, IIRW). However, Matlab is specialized on numerical analysis, maybe you should use another language (Python, Mathematica...) – Jean-Claude Arbaut Mar 28 '16 at 12:14
• You have also that kind of library: mathworks.com/matlabcentral/fileexchange/… Anyway, don't expect to compute this with "basic" matlab, as it uses only floating point numbers, or maybe finite precision integers. – Jean-Claude Arbaut Mar 28 '16 at 12:24
• You don't need to use MuPAD directly. If you have the Symbolic Math toolbox, as most do, see: help vpa – horchler Mar 28 '16 at 14:08