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.

A212135 Number of (w,x,y,z) with all terms in {1,...,n} and median

This page as a plain text file.
%I A212135 #12 Jul 13 2025 17:17:33
%S A212135 0,0,4,24,84,220,480,924,1624,2664,4140,6160,8844,12324,16744,22260,
%T A212135 29040,37264,47124,58824,72580,88620,107184,128524,152904,180600,
%U A212135 211900,247104,286524,330484,379320,433380,493024,558624,630564,709240,795060,888444
%N A212135 Number of (w,x,y,z) with all terms in {1,...,n} and median<mean.
%C A212135 Also, the number of (w,x,y,z) with all terms in {1,...,n} and median>mean.
%C A212135 For a guide to related sequences, see A211795.
%C A212135 Also, a(n+1) is the length of the long leg of the unique primitive Pythagorean triple whose inradius is A000217(n). - _Miguel-Ángel Pérez García-Ortega_, Jul 13 2025
%H A212135 Colin Barker, <a href="/A212135/b212135.txt">Table of n, a(n) for n = 0..1001</a>
%H A212135 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-10,10,-5,1).
%F A212135 a(n) + A212134(n) = n^4.
%F A212135 a(n) = n*(n - 1)*(n^2 - n + 2)/2.
%F A212135 a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
%F A212135 G.f.: 4*x*(1 + x + x^2) / (1 - x)^5. - _Colin Barker_, Dec 02 2017
%t A212135 t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[
%t A212135 Apply[Plus, Rest[Most[Sort[{w, x, y, z}]]]]/2 > (w + x + y + z)/4, s = s + 1], {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
%t A212135 Flatten[Map[{t[#]} &, Range[0, 20]]]  (* A212135 *)
%t A212135 %/4 (* A002817 *)
%o A212135 (PARI) concat(vector(2), Vec(4*x*(1 + x + x^2) / (1 - x)^5 + O(x^40))) \\ _Colin Barker_, Dec 02 2017
%Y A212135 Cf. A211795.
%K A212135 nonn,easy
%O A212135 0,3
%A A212135 _Clark Kimberling_, May 05 2012