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.

A212684 Number of (w,x,y,z) with all terms in {1,...,n} and |x-y|=n-w+|y-z|.

This page as a plain text file.
%I A212684 #13 Feb 17 2024 14:04:35
%S A212684 0,1,6,19,42,79,132,205,300,421,570,751,966,1219,1512,1849,2232,2665,
%T A212684 3150,3691,4290,4951,5676,6469,7332,8269,9282,10375,11550,12811,14160,
%U A212684 15601,17136,18769,20502,22339,24282,26335,28500,30781,33180
%N A212684 Number of (w,x,y,z) with all terms in {1,...,n} and  |x-y|=n-w+|y-z|.
%C A212684 For a guide to related sequences, see A211795.
%C A212684 Also the number of (w,x,y) with all terms in {0,...,n-1} and |w-x|>=|x-y|, see A212959. _Clark Kimberling_, Jun 02 2012
%H A212684 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2,-2,3,-1).
%F A212684 a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5).
%F A212684 a(n) + A212683(n) = n^3. _Clark Kimberling_, Jun 02 2012
%F A212684 G.f.: x*(1+3*x+3*x^2-x^3)/((1+x)*(1-x)^4). [_Bruno Berselli_, Jun 07 2012]
%F A212684 a(n) = (2*n*(n+2)*(2*n-1)-(-1)^n+1)/8. [_Bruno Berselli_, Jun 07 2012]
%t A212684 t = Compile[{{n, _Integer}}, Module[{s = 0},
%t A212684 (Do[If[Abs[x - y] == n - w + Abs[y - z], s = s + 1],
%t A212684 {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
%t A212684 Map[t[#] &, Range[0, 40]]   (* A212684 *)
%t A212684 LinearRecurrence[{3, -2, -2, 3, -1}, {0, 1, 6, 19, 42}, 41] (* _Bruno Berselli_, Jun 07 2012 *)
%o A212684 (Maxima) makelist(coeff(taylor(x*(1+3*x+3*x^2-x^3)/((1+x)*(1-x)^4), x, 0, n), x, n), n, 0, 40); /* _Bruno Berselli_, May 07 2012 */
%Y A212684 Cf. A211795.
%K A212684 nonn,easy
%O A212684 0,3
%A A212684 _Clark Kimberling_, May 24 2012