OFFSET
1,8
COMMENTS
LINKS
Wikipedia, Sierpiński carpet
EXAMPLE
The first pairs are:
(0, 0),
(0, 1), (1, 0),
(0, 2), (2, 0),
(0, 3), (1, 2), (2, 1), (3, 0),
(0, 4), (1, 3), (2, 2), (3, 1), (4, 0),
(0, 5), (2, 3), (3, 2), (5, 0),
(0, 6), (1, 5), (2, 4), (4, 2), (5, 1), (6, 0),
(0, 7), (1, 6), (2, 5), (5, 2), (6, 1), (7, 0),
(0, 8), (2, 6), (6, 2), (8, 0),
...
PROG
(PARI) is(i, j) = { while (i && j, if (i%3==1 && j%3==1, return (0), i\=3; j\=3; ); ); return (1); }
row(ij) = apply (i -> [i, ij-i], select(i -> is(i, ij-i), [0..ij]))
CROSSREFS
KEYWORD
nonn,tabf,base
AUTHOR
Rémy Sigrist, Apr 16 2023
STATUS
approved