OFFSET
1,4
FORMULA
T(1,k) = A000010(k) for k >= 1; T(n,k) = Sum_{i=1..k} T(n-1,i) for n > 1, k >= 1.
EXAMPLE
First 10 rows and columns:
n\k | 1 2 3 4 5 6 7 8 9 10 ...
----+---------------------------------------------------------
1 | 1 1 2 2 4 2 6 4 6 4 ... = A000010
2 | 1 2 4 6 10 12 18 22 28 32 ... = A002088
3 | 1 3 7 13 23 35 53 75 103 135 ... = A103116
4 | 1 4 11 24 47 82 135 210 313 448 ...
5 | 1 5 16 40 87 169 304 514 827 1275 ...
6 | 1 6 22 62 149 318 622 1136 1963 3238 ...
7 | 1 7 29 91 240 558 1180 2316 4279 7517 ...
8 | 1 8 37 128 368 926 2106 4422 8701 16218 ...
9 | 1 9 46 174 542 1468 3574 7996 16697 32915 ...
10 | 1 10 56 230 772 2240 5814 13810 30507 63422 ...
...
MATHEMATICA
T[1, k_] := EulerPhi[k]; T[n_, k_] := T[n, k] = Sum[T[n - 1, i], {i, 1, k}]; Table[T[k, n - k + 1], {n, 1, 11}, {k, 1, n}] // Flatten (* Amiram Eldar, Feb 09 2024 *)
PROG
(MATLAB)
function out = a(n)
Z = zeros(n);
A = arrayfun(@eulerPhi, [1:n]);
Z(1, 1:n) = A;
for i = 2 : n
A = cumsum(A);
Z(i, 1:n) = A;
end
[nr, nc] = size(Z);
[R, C] = ndgrid(1:nr, 1:nc);
M = [reshape(R+C, [], 1), R(:)];
[~, ind] = sortrows(M);
Z = Z(ind)';
out = Z(1, n);
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Miles Englezou, Feb 08 2024
STATUS
approved