%I #50 Apr 23 2018 10:18:38
%S 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,
%T 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,
%U 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
%N A(n,k) is the base-k complement of n; square array A(n,k), n>=0, k>=2, read by antidiagonals.
%C Every column is a permutation of the nonnegative integers.
%H Alois P. Heinz, <a href="/A248813/b248813.txt">Antidiagonals n = 0..140, flattened</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the nonnegative integers</a>
%e Square array A(n,k) begins:
%e 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...
%e 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...
%e 3, 6, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
%e 4, 8, 12, 1, 2, 3, 4, 5, 6, 7, 8, ...
%e 5, 7, 15, 20, 1, 2, 3, 4, 5, 6, 7, ...
%e 6, 3, 14, 24, 30, 1, 2, 3, 4, 5, 6, ...
%e 7, 5, 13, 23, 35, 42, 1, 2, 3, 4, 5, ...
%e 8, 4, 8, 22, 34, 48, 56, 1, 2, 3, 4, ...
%e 9, 18, 11, 21, 33, 47, 63, 72, 1, 2, 3, ...
%e 10, 20, 10, 15, 32, 46, 62, 80, 90, 1, 2, ...
%p A:= proc(n, k) local t, r, i; t, r:= n, 0;
%p for i from 0 while t>0 do
%p r:= r+k^i *irem(k-irem(t, k, 't'), k)
%p od; r
%p end:
%p seq(seq(A(n, 2+d-n), n=0..d), d=0..14);
%o (PARI) A(n,k)=fromdigits(apply(d->(k-d)%k, digits(n, k)), k); \\ _Gheorghe Coserea_, Apr 23 2018
%Y Columns k=2-16 give: A001477, A004488, A048647, A055115, A055116, A055117, A055118, A055119, A055120, A055121, A055122, A055123, A055124, A055125, A055126.
%K nonn,tabl,base,look
%O 0,5
%A _Alois P. Heinz_, Mar 03 2015