So if I have an algorithm let's say "if you have a number n every time the algorithm runs the number triples and becomes greater by 5. As I understand I would write such equation as 3n+5 and then for every greater term I would use a composition of functions.
The question is what are other algorithms besides "increased x times and became greater by y" that can be represented mathematically AS AN EQUATION?
I am asking this because I cannot think of any other algorithms that could be expressed as an equation.
There is of course a huge ambiguity around what "mathematically-representable algorithm" means. For example, are we allowed to include steps like "if the twin prime conjecture is true, then [stuff]"?
However, there is a natural formal notion here: that of the computable (or recursive) functions. There are many equivalent formal definitions of these, with arguably the most intuitively compelling one being Turing machines, and it is generally accepted that these constitute those functions which have "genuine" algorithms (this statement is called Church's thesis, or in more recent literature the Church-Turing thesis).
There are also interesting more restricted notions of computation. For example, in general it's not possible to tell, algorithmically, whether a computable function is defined on a given input; maybe we want to restrict attention to algorithms which "clearly" always halt. Historically the first formal notion of computation (that I'm aware of, anyways) is primitive recursion, which is much more restricted. There is in general a rich universe of such "subrecursion" notions (and I have to at this point plug one of my mathematical heroes, Rozsa Peter, who is not nearly as well-known as she should be); theoretical computer science (in particular, complexity theory) tends to study ones much weaker than primitive recursion (e.g. P, NP, EXP, ...), but there are also ones much stronger than primitive recursion.
It's worth noting that all of the above is focusing on algorithms/functions on the natural numbers (or equivalent domains, like integers, rationals, finite binary strings, ...). Going beyond this - even to just real numbers - introduces genuine difficulties, and one should thoroughly understand the basic theory of computation on $\mathbb{N}$ before going further. That said, the "natural next step" is computable analysis in its various flavors.