The hotpo package provides functions for calculating and investigating the Collatz sequence, where each term is half the previous one (if previous term even) or three times the previous term plus one (if previous term odd). The sequence ends when it reaches 1 (at which point it would go into the infinite loop 4, 2, 1, 4, 2, 1,...).
hotpo
functionshotpo1
: calculate next term in sequence
hotpo_seq
: calculate whole sequence
hotpo_len
: length of sequence
hotpo_hi
: maximum term of sequence
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.