Be aware that your recursion formula for n=1 accesses Mn(0) (Mn((1-1)/2) in the “odd” case). This is not problem for GAMS, this will evaluate just as 0. But you should think about this.
Before proceeding to the study of logical operators, I assembled models compiled in the early stages of GAMS development and used them in the examples’ library.
I already had thoughts about using the help of programmers with many years of experience in these areas https://www.assignmentexpert.com/programming, since the approach I took to study has a little drawback: the initial “usability” to the package may take a certain amount of time (this is actually my initial experience).
However, modern appearance still has a developed,
fully functional Windows-like interface and therefore I hope that this problem will be easily overcome by me shortly.
Thanks for the wise advice!