OFFSET
0,4
COMMENTS
Each column is a permutation of the nonnegative integers.
Column w can be used to mirror horizontally an infinite rectangular image of width w stored in a array of pixels. The pixels in the first row of the image are numbered from 0 to w-1 and subsequent rows continue the numbering likewise.
FORMULA
a(n,w) = ((w - (n mod w) - 1) + n) - (n mod w).
EXAMPLE
The transposed array begins:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14 17 16 19 18 ...
2 1 0 5 4 3 8 7 6 11 10 9 14 13 12 17 16 15 20 19 ...
3 2 1 0 7 6 5 4 11 10 9 8 15 14 13 12 19 18 17 16 ...
4 3 2 1 0 9 8 7 6 5 14 13 12 11 10 19 18 17 16 15 ...
5 4 3 2 1 0 11 10 9 8 7 6 17 16 15 14 13 12 23 22 ...
6 5 4 3 2 1 0 13 12 11 10 9 8 7 20 19 18 17 16 15 ...
7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 23 22 21 20 ...
8 7 6 5 4 3 2 1 0 17 16 15 14 13 12 11 10 9 26 25 ...
9 8 7 6 5 4 3 2 1 0 19 18 17 16 15 14 13 12 11 10 ......
MAPLE
a:= (n, w) -> ((w - (n mod w) - 1) + n) - (n mod w):
seq(seq(a(n, 1+d-n), n=0..d), d=0..12); # Alois P. Heinz, Jun 07 2023
PROG
(PARI) a(n, w) = ((w - n % w - 1) + n) - n % w;
matrix(7, 7, n, k, a(k-1, n)) \\ Michel Marcus, Jun 07 2023
CROSSREFS
KEYWORD
AUTHOR
Lucas Beristayn, Mar 25 2012
EXTENSIONS
Edited by N. J. A. Sloane, Mar 26 2012
Entry revised by Editors of the OEIS, Jun 17 2023
STATUS
approved