Let $(5,r_1,r_2,r_3,0)$ be an integer sequence. I want to generate all possible sequences of this form subject to the following two constraints:
(ii) $r_i$’s are distinct;
(i) $|r_{i+1}-r_i|5$ for each $0le ile 3$ (where $r_0=4,r_4=0$).
I was wondering how one can use sage to develop such an algorithm.
I have not tried anything as I just started learning SageMath. The only I know how to use is the Lagrange’s Interpolation polynomial. But doing things by hand is quite cumbersome.
ShyamalSayak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.