OFFSET
1,3
FORMULA
T(n,k) = Sum_{j=1..n} j^k * Sum_{d|j} (1 - (1 - 1/d)^k) for k > 0.
EXAMPLE
Square array begins:
1, 1, 1, 1, 1, 1, 1, ...
2, 4, 8, 16, 32, 64, 128, ...
3, 8, 22, 62, 178, 518, 1522, ...
4, 15, 57, 219, 849, 3315, 13017, ...
5, 21, 91, 405, 1843, 8541, 40171, ...
6, 33, 185, 1053, 6065, 35253, 206345, ...
7, 41, 247, 1523, 9571, 61091, 394987, ...
MATHEMATICA
T[n_, k_] := Sum[(j * Floor[n/j])^k, {j, 1, n}]; Table[T[k, n - k], {n, 1, 11}, {k, 1, n}] // Flatten (* Amiram Eldar, Jul 31 2022 *)
PROG
(PARI) T(n, k) = sum(j=1, n, (j*(n\j))^k);
(PARI) T(n, k) = if(k==0, n, sum(j=1, n, j^k*sumdiv(j, d, 1-(1-1/d)^k)));
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Seiichi Manyama, Jul 31 2022
STATUS
approved