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) * (k-n+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, 1, 0, -1, -2, -3, -4, ...
3, 3, 5, 9, 15, 23, 33, ...
4, 2, -4, -20, -52, -106, -188, ...
5, 4, 13, 62, 205, 520, 1109, ...
6, 4, -16, -174, -806, -2584, -6636, ...
Antidiagonal triangle, T(n, k), begins:
1;
1, 2;
1, 1, 3;
1, 0, 3, 4;
1, -1, 5, 2, 5;
1, -2, 9, -4, 4, 6;
1, -3, 15, -20, 13, 4, 7;
1, -4, 23, -52, 62, -16, 6, 8;
1, -5, 33, -106, 205, -174, 49, 4, 9;
1, -6, 45, -188, 520, -806, 556, -88, 7, 10;
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]]) >;
A344824:= func< n, k | A(k+1, n-k-1) >;
[A344824(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 A344824(n, k): return A(k+1, n-k-1)
flatten([[A344824(n, k) for k in range(n)] for n in range(1, 13)]) # G. C. Greubel, Jun 27 2024
CROSSREFS
KEYWORD
sign,tabl
AUTHOR
Seiichi Manyama, May 29 2021
STATUS
approved