cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A357213 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.

This page as a plain text file.
%I A357213 #17 Sep 26 2022 17:32:08
%S A357213 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 A357213 12,20,32,48,64,64,9,8,14,24,40,64,96,128,128,10,9,16,28,48,80,128,
%U A357213 192,256,256,11,10,18,32,56,96,160,256,384,512,512,12,11
%N A357213 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 A357213 The n-th diagonal starts with n, followed by n*A000079(k), for k >= 0.
%F A357213 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 A357213 First 7 rows:
%e A357213   1
%e A357213   2     1
%e A357213   3     2     2
%e A357213   4     3     4     4
%e A357213   5     4     6     8    8
%e A357213   6     5     8    12   16    16
%e A357213   7     6    10    16   24    32   32
%t A357213 s[n_] := s[n] = Subsets[Range[n]]
%t A357213 u[n_, k_] := u[n, k] = Max[s[n][[k]]] - Min[s[n][[k]]]
%t A357213 v[n_] := Table[u[n, k], {k, 1, 2^n}];
%t A357213 t = Table[Count[v[n], i], {n, 1, 14}, {i, 0, n - 1}]
%t A357213 TableForm[t] (* A357213, array *)
%t A357213 Flatten[t]   (* A357213, sequence *)
%o A357213 (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 A357213 Cf. A000027, A130128 (obtained by deleting the first column), A000225 (row sums).
%K A357213 nonn,tabl
%O A357213 1,2
%A A357213 _Clark Kimberling_, Sep 24 2022