OFFSET
1,2
LINKS
Alois P. Heinz, Antidiagonals n = 1..365, flattened
EXAMPLE
Square array A(n,k) begins:
0, 3, 6, 13, 21, 23, 27, 33, 46, 67, ...
1, 7, 10, 16, 31, 38, 41, 43, 52, 70, ...
2, 9, 12, 19, 36, 49, 55, 64, 78, 91, ...
4, 15, 18, 29, 44, 56, 58, 76, 88, 93, ...
5, 17, 25, 30, 59, 62, 73, 84, 90, 98, ...
8, 20, 26, 40, 61, 72, 75, 87, 117, 139, ...
11, 24, 37, 50, 69, 79, 85, 121, 124, 154, ...
14, 34, 39, 51, 82, 102, 118, 142, 155, 157, ...
22, 35, 47, 66, 97, 110, 133, 180, 190, 202, ...
28, 53, 57, 74, 106, 116, 164, 183, 197, 205, ...
MAPLE
b:= proc() 0 end:
g:= proc(n) option remember; local t;
t:= `if`(n<2, n, b(g(n-1))+b(g(n-2)));
b(t):= b(t)+1; t
end:
f:= proc(n) option remember; b(g(n)) end:
A:= proc() local l, t; t, l:= -1, proc() [] end;
proc(n, k) local h;
while nops(l(k))<n do t:= t+1;
h:= f(t); l(h):= [l(h)[], t]
od: l(k)[n]
end
end():
seq(seq(A(n, 1+d-n), n=1..d), d=1..14);
MATHEMATICA
b[_] = 0;
g[n_] := g[n] = Module[{t}, t = If[n < 2, n, b[g[n - 1]] + b[g[n - 2]]]; b[t]++; t];
f[n_] := f[n] = b[g[n]];
A[n_, k_] := Module[{l, t = -1, h}, l[_] = {}; While[Length[l[k]] < n, t++; h = f[t]; AppendTo[l[h], t]]; l[k][[n]]];
Table[Table[A[n, 1 + d - n], {n, 1, d}], {d, 1, 14}] // Flatten (* _Jean-François Alcover_, Feb 11 2021, after _Alois P. Heinz_ *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
_Alois P. Heinz_, Dec 18 2019
STATUS
approved