%I #17 Sep 26 2022 17:32:08
%S 1,2,1,3,2,2,4,3,4,4,5,4,6,8,8,6,5,8,12,16,16,7,6,10,16,24,32,32,8,7,
%T 12,20,32,48,64,64,9,8,14,24,40,64,96,128,128,10,9,16,28,48,80,128,
%U 192,256,256,11,10,18,32,56,96,160,256,384,512,512,12,11
%N Triangular array read by rows: T(n, k) = number of subsets s of {1, 2, ..., n} such max(s) - min(s) = k, for n >= 1, 0 <= k <= n-1.
%F The n-th diagonal starts with n, followed by n*A000079(k), for k >= 0.
%F The columns, excluding the first, are given as in A130128 by T(n,k) = (n-k+1)*2^(k-1), for n >= 1, k >= 1.
%e First 7 rows:
%e 1
%e 2 1
%e 3 2 2
%e 4 3 4 4
%e 5 4 6 8 8
%e 6 5 8 12 16 16
%e 7 6 10 16 24 32 32
%t s[n_] := s[n] = Subsets[Range[n]]
%t u[n_, k_] := u[n, k] = Max[s[n][[k]]] - Min[s[n][[k]]]
%t v[n_] := Table[u[n, k], {k, 1, 2^n}];
%t t = Table[Count[v[n], i], {n, 1, 14}, {i, 0, n - 1}]
%t TableForm[t] (* A357213, array *)
%t Flatten[t] (* A357213, sequence *)
%o (PARI) T(n, k) = my(nb=0); forsubset(n, s, if (#s && (vecmax(s)-vecmin(s) == k), nb++)); nb; \\ _Michel Marcus_, Sep 26 2022
%Y Cf. A000027, A130128 (obtained by deleting the first column), A000225 (row sums).
%K nonn,tabl
%O 1,2
%A _Clark Kimberling_, Sep 24 2022