login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A285723
Transpose of square array A285722.
3
0, 1, 1, 3, 0, 2, 6, 2, 3, 4, 10, 5, 0, 5, 7, 15, 9, 4, 6, 8, 11, 21, 14, 8, 0, 9, 12, 16, 28, 20, 13, 7, 10, 13, 17, 22, 36, 27, 19, 12, 0, 14, 18, 23, 29, 45, 35, 26, 18, 11, 15, 19, 24, 30, 37, 55, 44, 34, 25, 17, 0, 20, 25, 31, 38, 46, 66, 54, 43, 33, 24, 16, 21, 26, 32, 39, 47, 56, 78, 65, 53, 42, 32, 23, 0, 27, 33, 40, 48, 57, 67, 91, 77, 64, 52, 41, 31, 22, 28, 34, 41, 49, 58, 68, 79
OFFSET
1,4
COMMENTS
See A285722.
FORMULA
A(n,k) = A285722(k,n).
EXAMPLE
The top left 14 X 14 corner of the array:
0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91
1, 0, 2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90
2, 3, 0, 4, 8, 13, 19, 26, 34, 43, 53, 64, 76, 89
4, 5, 6, 0, 7, 12, 18, 25, 33, 42, 52, 63, 75, 88
7, 8, 9, 10, 0, 11, 17, 24, 32, 41, 51, 62, 74, 87
11, 12, 13, 14, 15, 0, 16, 23, 31, 40, 50, 61, 73, 86
16, 17, 18, 19, 20, 21, 0, 22, 30, 39, 49, 60, 72, 85
22, 23, 24, 25, 26, 27, 28, 0, 29, 38, 48, 59, 71, 84
29, 30, 31, 32, 33, 34, 35, 36, 0, 37, 47, 58, 70, 83
37, 38, 39, 40, 41, 42, 43, 44, 45, 0, 46, 57, 69, 82
46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 0, 56, 68, 81
56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 0, 67, 80
67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 0, 79
79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 0
MATHEMATICA
A[n_, n_] = 0;
A[n_, k_] /; k == n - 1 := (k^2 - k + 2)/2;
A[1, k_] := (k^2 - 3 k + 4)/2;
A[n_, k_] /; 1 <= k <= n - 2 := A[n, k] = A[n, k + 1] + 1;
A[n_, k_] /; k > n := A[n, k] = A[n - 1, k] + 1;
T[n_, k_] := A[k, n];
Table[T[n - k + 1, k], {n, 1, 14}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Nov 19 2019 *)
PROG
(Scheme) (define (A285723 n) (A285722bi (A004736 n) (A002260 n))) ;; For A285722bi see A285722.
(Python)
def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
def A(n, k): return 0 if n == k else T(n - k, k) if n>k else T(n, k - n)
for n in range(1, 21): print([A(n - k + 1, k) for k in range(1, n + 1)]) # Indranil Ghosh, May 03 2017
CROSSREFS
Transpose: A285722.
Cf. A000217 (row 1), A000124 (column 1, from 1 onward).
Cf. also A285733.
Sequence in context: A222602 A058544 A112156 * A072328 A135040 A048733
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, May 03 2017
STATUS
approved