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.
%I A212138 #13 Oct 27 2024 03:10:44 %S A212138 1,2,0,3,0,1,4,0,2,0,5,0,4,0,1,6,0,6,2,2,0,7,0,9,4,5,0,1,8,0,12,8,10, %T A212138 2,2,0,9,0,16,14,18,8,6,0,1,10,0,20,22,32,20,14,4,2,0,11,0,25,32,52, %U A212138 42,34,14,7,0,1,12,0,30,46,80,80,72,42,22,4,2,0,13,0,36,62,119,1 %N A212138 Triangular array: T(n,k) is the number of k-element subsets S of {1,...,n} whose average is in S. %e A212138 First 7 rows: %e A212138 1 %e A212138 2...0 %e A212138 3...0...1 %e A212138 4...0...2...0 %e A212138 5...0...4...0...1 %e A212138 6...0...6...2...2...0 %e A212138 7...0...9...4...5...0...1 %e A212138 T(5,3) counts these subsets: {1,2,3}, {1,3,5}, {2,3,4}, {3,4,5}. %t A212138 t[n_, k_] := Length[Flatten[Map[Apply[Intersection, #] &, %t A212138 Select[Map[{#, {Mean[#]}} &, Subsets[Range[n], {k}]], IntegerQ[Last[Last[#]]] &]]]] %t A212138 Flatten[Table[t[n, k], {n, 1, 12}, {k, 1, n}]] %t A212138 TableForm[Table[t[n, k], {n, 1, 12}, {k, 1, n}]] %t A212138 (* _Peter J. C. Moses_, May 01 2012 *) %Y A212138 Cf. A061865. %K A212138 nonn,tabl %O A212138 1,2 %A A212138 _Clark Kimberling_, May 06 2012