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.

A212146 Number of subsets of {1,...,n} having mean=median.

This page as a plain text file.
%I A212146 #15 Oct 03 2014 10:36:48
%S A212146 1,3,7,13,23,37,59,91,141,217,341,541,879,1453,2455,4217,7371,13047,
%T A212146 23375,42259,77027,141299,260695,483221,899471,1680269,3149075,
%U A212146 5918701,11153461,21067693,39881625,75647719,143756049,273654821,521769373,996334961,1905214687
%N A212146 Number of subsets of {1,...,n} having mean=median.
%C A212146 a(n) = sum of terms of row n of the triangle A212139.
%C A212146 a(n) = 1+2*A212147(n).
%H A212146 Hiroaki Yamanouchi, <a href="/A212146/b212146.txt">Table of n, a(n) for n = 1..100</a>
%t A212146 t[n_, k_] := t[n, k] = Count[Map[Median[#] == Mean[#] &, Subsets[Range[n], {k}]], True]
%t A212146 Flatten[Table[t[n, k], {n, 1, 12}, {k, 1, n}]]  (* A212139 *)
%t A212146 TableForm[Table[t[n, k], {n, 1, 12}, {k, 1, n}]]
%t A212146 s[n_] := Sum[t[n, k], {k, 1, n}]
%t A212146 Table[s[n], {n, 1, 22}]   (* A212146 *)
%t A212146 (% - 1)/2                 (* A212147 *)
%t A212146 (* _Peter J. C. Moses_, May 01 2012 *)
%Y A212146 Cf. A212138.
%K A212146 nonn
%O A212146 1,2
%A A212146 _Clark Kimberling_, May 06 2012
%E A212146 a(23) from _Alois P. Heinz_, Feb 12 2014
%E A212146 a(24)-a(37) from _Hiroaki Yamanouchi_, Oct 03 2014