login
A322426
Array read by downwards antidiagonals: A(n, k) is the k-th term of a "Look to the left" sequence starting with 1,2,...,n (see A293630).
5
1, 2, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 3, 2, 1, 2, 2, 4, 3, 2, 1, 1, 1, 1, 4, 3, 2, 1, 1, 2, 2, 5, 4, 3, 2, 1, 2, 1, 3, 1, 5, 4, 3, 2, 1, 1, 2, 1, 2, 6, 5, 4, 3, 2, 1, 1, 1, 2, 3, 1, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 2, 7, 6, 5, 4, 3, 2, 1, 2, 3, 1, 1, 3, 1, 7, 6, 5
OFFSET
2,2
FORMULA
If k <= n, A(n, k) = k.
EXAMPLE
| n\k | 1 2 3 4 5 6 7 8 9 10 11 12 13 ...
|-----|-----------------------------------------------------------
| 2 | 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, ...
| 3 | 1, 2, 3, 1, 2, 1, 2, 1, 2, 1, 2, 3, 1, ...
| 4 | 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 1, 2, 3, ...
| 5 | 1, 2, 3, 4, 5, 1, 2, 3, 4, 1, 2, 3, 4, ...
| 6 | 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 1, 2, ...
| 7 | 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, ...
| 8 | 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, ...
| ... |
PROG
(PARI) row(n, k) = my(v=vector(n, i, i), w); while(#v<k, w=vector(#v-1, i, v[i]); for(y=1, v[#v], v=concat(v, w))); vector(k, i, v[i])
first(n, k) = my(v, m=matrix(0, k)); for(x=1, n, v=row(x+1, k); m=concat(m, v)); m
CROSSREFS
n-th row: A293630 (n=2), A322423 (n=3), A322424 (n=4), A322425 (n=5).
Sequence in context: A262928 A228429 A108316 * A335438 A145574 A182579
KEYWORD
nonn,tabl,look
AUTHOR
Iain Fox, Dec 07 2018
STATUS
approved