Stefan
Legend
Yesterday I had a breakthrough moment and, for those who are interested, here is my function for all integer n:
\( f(n)=(n\mbox{ }mod\mbox{ }7)-7\lceil\frac{(n\mbox{ }mod\mbox{ }7)}{7}-\frac{1}{2}\rceil \)
Where \( \lceil n \rceil \) is the ceiling function of n, also called the least integer function.
That's rather complicated. I usually do:
((n + 3) mod 7) - 3
Last edited: