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.

A212139 Triangular array: T(n,k) is the number of k-element subsets of {1,...,n} that satisfy mean=median.

This page as a plain text file.
%I A212139 #14 Oct 27 2024 03:11:07
%S A212139 1,2,1,3,3,1,4,6,2,1,5,10,4,3,1,6,15,6,7,2,1,7,21,9,13,5,3,1,8,28,12,
%T A212139 22,10,8,2,1,9,36,16,34,18,18,6,3,1,10,45,20,50,30,36,14,9,2,1,11,55,
%U A212139 25,70,48,66,32,23,7,3,1,12,66,30,95,72,114,64,55,20,10,2,1
%N A212139 Triangular array: T(n,k) is the number of k-element subsets of {1,...,n} that satisfy mean=median.
%C A212139 Row sums: A212146.
%e A212139 First 7 rows:
%e A212139   1
%e A212139   2...1
%e A212139   3...3....1
%e A212139   4...6....2...1
%e A212139   5...10...4...3....1
%e A212139   6...15...6...7....2...1
%e A212139   7...21...9...13...5...3...1
%e A212139 T(5,3) counts these subsets: {1,2,3}, {1,3,5}, {2,3,4}, {3,4,5}.
%t A212139 t[n_, k_] := t[n, k] = Count[Map[Median[#] == Mean[#] &, Subsets[Range[n], {k}]], True]
%t A212139 Flatten[Table[t[n, k], {n, 1, 12}, {k, 1, n}]]
%t A212139 TableForm[Table[t[n, k], {n, 1, 12}, {k, 1, n}]]
%t A212139 s[n_] := Sum[t[n, k], {k, 1, n}]
%t A212139 Table[s[n], {n, 1, 22}]   (* A212146 *)
%t A212139 (% - 1)/2  (* A212147 *)
%t A212139 (* _Peter J. C. Moses_, May 01 2012 *)
%Y A212139 Cf. A212138.
%K A212139 nonn,tabl
%O A212139 1,2
%A A212139 _Clark Kimberling_, May 06 2012