login
A248813
A(n,k) is the base-k complement of n; square array A(n,k), n>=0, k>=2, read by antidiagonals.
15
0, 0, 1, 0, 2, 2, 0, 3, 1, 3, 0, 4, 2, 6, 4, 0, 5, 3, 1, 8, 5, 0, 6, 4, 2, 12, 7, 6, 0, 7, 5, 3, 1, 15, 3, 7, 0, 8, 6, 4, 2, 20, 14, 5, 8, 0, 9, 7, 5, 3, 1, 24, 13, 4, 9, 0, 10, 8, 6, 4, 2, 30, 23, 8, 18, 10, 0, 11, 9, 7, 5, 3, 1, 35, 22, 11, 20, 11, 0, 12, 10, 8, 6, 4, 2, 42, 34, 21, 10, 19, 12
OFFSET
0,5
COMMENTS
Every column is a permutation of the nonnegative integers.
EXAMPLE
Square array A(n,k) begins:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...
2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...
3, 6, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
4, 8, 12, 1, 2, 3, 4, 5, 6, 7, 8, ...
5, 7, 15, 20, 1, 2, 3, 4, 5, 6, 7, ...
6, 3, 14, 24, 30, 1, 2, 3, 4, 5, 6, ...
7, 5, 13, 23, 35, 42, 1, 2, 3, 4, 5, ...
8, 4, 8, 22, 34, 48, 56, 1, 2, 3, 4, ...
9, 18, 11, 21, 33, 47, 63, 72, 1, 2, 3, ...
10, 20, 10, 15, 32, 46, 62, 80, 90, 1, 2, ...
MAPLE
A:= proc(n, k) local t, r, i; t, r:= n, 0;
for i from 0 while t>0 do
r:= r+k^i *irem(k-irem(t, k, 't'), k)
od; r
end:
seq(seq(A(n, 2+d-n), n=0..d), d=0..14);
PROG
(PARI) A(n, k)=fromdigits(apply(d->(k-d)%k, digits(n, k)), k); \\ Gheorghe Coserea, Apr 23 2018
KEYWORD
nonn,tabl,base,look
AUTHOR
Alois P. Heinz, Mar 03 2015
STATUS
approved