Here's an example of what I mean for mod 3: $1 => 1$, $2 => 2$, $3 => 3$, $4 => 1$ and so forth. This is for computer programming and while obviously I can easily calculate this I am simply curious whether it's possible without comparisons.
Asked
Active
Viewed 33 times
1
-
What is your actual question? In particular what does the "it's" mean in the last sentence. – Michael Burr Dec 31 '16 at 12:47
-
If $mod(i,n)$ gives outputs in the range $0..n-1$, then won't $1+mod(i-1,n)$ do what you want? – Jyrki Lahtonen Dec 31 '16 at 12:49