OFFSET
1,2
LINKS
Alois P. Heinz, Antidiagonals n = 1..141, flattened
EXAMPLE
Square array A(n,k) begins:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...
2, 5, 10, 19, 36, 69, 134, 263, 520, 1033, ...
3, 8, 17, 34, 67, 132, 261, 518, 1031, 2056, ...
4, 10, 24, 49, 98, 195, 388, 773, 1542, 3079, ...
5, 13, 29, 64, 129, 258, 515, 1028, 2053, 4102, ...
6, 17, 36, 84, 160, 321, 642, 1283, 2564, 5125, ...
7, 18, 43, 99, 247, 384, 769, 1538, 3075, 6148, ...
8, 20, 55, 114, 278, 734, 896, 1793, 3586, 7171, ...
9, 25, 62, 129, 309, 797, 2193, 2048, 4097, 8194, ...
10, 26, 66, 164, 340, 860, 2320, 6568, 4608, 9217, ...
MAPLE
A:= proc() local l, w, A; l, w, A:= proc() [] end, proc() [] end,
proc(n, k) option remember; local b; b:=
proc(x, y) option remember; `if`(x=0, {0}, `if`(y<1, {},
{b(x, y-1)[], map(t-> t+l(k)[y], b(x-1, y))[]}))
end;
while nops(w(k)) < n do forget(b);
l(k):= [l(k)[], (nops(l(k))+1)^k];
w(k):= sort([select(h-> h<l(k)[-1], b(k, nops(l(k))))[]])
od; w(k)[n]
end; A
end():
seq(seq(A(n, 1+d-n), n=1..d), d=1..12);
MATHEMATICA
nmax = 12;
pow[n_, k_] := IntegerPartitions[n, {k}, Range[n^(1/k) // Ceiling]^k];
col[k_] := col[k] = Reap[Module[{j = k, n = 1, p}, While[n <= nmax, p = pow[j, k]; If[p =!= {}, Sow[j]; n++]; j++]]][[2, 1]];
A[n_, k_] := col[k][[n]];
Table[A[n-k+1, k], {n, 1, nmax}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Dec 03 2020 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Aug 01 2020
STATUS
approved