OFFSET
1,3
LINKS
G. C. Greubel, Antidiagonals n = 1..50, flattened
FORMULA
G.f. of column k: (1/(1 - x)) * Sum_{j>=1} x^j/(1 - k*x^j).
G.f. of column k: (1/(1 - x)) * Sum_{j>=1} k^(j-1) * x^j/(1 - x^j).
A(n, k) = Sum_{j=1..n} Sum_{d|j} k^(d - 1).
T(n, k) = Sum_{j=1..k+1} floor((k+1)/j) * (n-k-1)^(j-1), for n >= 1, 0 <= k <= n-1 (antidiagonal triangle). - G. C. Greubel, Jun 27 2024
EXAMPLE
Square array, A(n, k), begins:
1, 1, 1, 1, 1, 1, 1, ...
2, 3, 4, 5, 6, 7, 8, ...
3, 5, 9, 15, 23, 33, 45, ...
4, 8, 20, 46, 92, 164, 268, ...
5, 10, 37, 128, 349, 790, 1565, ...
6, 14, 76, 384, 1394, 3946, 9384, ...
Antidiagonal triangle, T(n, k), begins:
1;
1, 2;
1, 3, 3;
1, 4, 5, 4;
1, 5, 9, 8, 5;
1, 6, 15, 20, 10, 6;
1, 7, 23, 46, 37, 14, 7;
1, 8, 33, 92, 128, 76, 16, 8;
1, 9, 45, 164, 349, 384, 141, 20, 9;
MATHEMATICA
A[n_, k_] := Sum[If[k == 0 && j == 1, 1, k^(j - 1)] * Quotient[n, j], {j, 1, n}]; Table[A[k, n - k], {n, 1, 10}, {k, 1, n}] // Flatten (* Amiram Eldar, May 29 2021 *)
PROG
(PARI) A(n, k) = sum(j=1, n, n\j*k^(j-1));
(PARI) A(n, k) = sum(j=1, n, sumdiv(j, d, k^(d-1)));
(Magma)
A:= func< n, k | k eq n select n else (&+[Floor(n/j)*k^(j-1): j in [1..n]]) >;
A344821:= func< n, k | A(k+1, n-k-1) >;
[A344821(n, k): k in [0..n-1], n in [1..12]]; // G. C. Greubel, Jun 27 2024
(SageMath)
def A(n, k): return n if k==n else sum((n//j)*k^(j-1) for j in range(1, n+1))
def A344821(n, k): return A(k+1, n-k-1)
flatten([[A344821(n, k) for k in range(n)] for n in range(1, 13)]) # G. C. Greubel, Jun 27 2024
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Seiichi Manyama, May 29 2021
STATUS
approved