login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 1
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, 12, 20, 32, 48, 64, 64, 9, 8, 14, 24, 40, 64, 96, 128, 128, 10, 9, 16, 28, 48, 80, 128, 192, 256, 256, 11, 10, 18, 32, 56, 96, 160, 256, 384, 512, 512, 12, 11 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
The n-th diagonal starts with n, followed by n*A000079(k), for k >= 0.
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.
EXAMPLE
First 7 rows:
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
MATHEMATICA
s[n_] := s[n] = Subsets[Range[n]]
u[n_, k_] := u[n, k] = Max[s[n][[k]]] - Min[s[n][[k]]]
v[n_] := Table[u[n, k], {k, 1, 2^n}];
t = Table[Count[v[n], i], {n, 1, 14}, {i, 0, n - 1}]
TableForm[t] (* A357213, array *)
Flatten[t] (* A357213, sequence *)
PROG
(PARI) T(n, k) = my(nb=0); forsubset(n, s, if (#s && (vecmax(s)-vecmin(s) == k), nb++)); nb; \\ Michel Marcus, Sep 26 2022
CROSSREFS
Cf. A000027, A130128 (obtained by deleting the first column), A000225 (row sums).
Sequence in context: A132923 A144329 A141157 * A137948 A210553 A269456
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Sep 24 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 10:11 EDT 2024. Contains 371935 sequences. (Running on oeis4.)