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.

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

This page as a plain text file.
%I A212680 #16 Feb 27 2018 22:26:53
%S A212680 0,0,4,18,56,120,228,378,592,864,1220,1650,2184,2808,3556,4410,5408,
%T A212680 6528,7812,9234,10840,12600,14564,16698,19056,21600,24388,27378,30632,
%U A212680 34104,37860,41850,46144,50688,55556,60690,66168,71928,78052
%N A212680 Number of (w,x,y,z) with all terms in {1,...,n} and |x-y|=|y-z|+1.
%C A212680 Every term is even.  For a guide to related sequences, see A211795.
%H A212680 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2, 1, -4, 1, 2, -1).
%F A212680 a(n)=2*a(n-1)+a(n-2)-4*a(n-3)+a(n-4)+2*a(n-5)-a(n-6).
%F A212680 G.f.: (2 x^2 (2 + x) (1 + 2 x + 3 x^2))/((-1 + x)^4 (1 + x)^2). [corrected by _Clark Kimberling_, Feb 27 2018]
%t A212680 t = Compile[{{n, _Integer}}, Module[{s = 0},
%t A212680 (Do[If[Abs[x - y] == Abs[y - z] + 1, s = s + 1],
%t A212680 {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
%t A212680 Map[t[#] &, Range[0, 40]]   (* A212680 *)
%t A212680 %/2 (* integers *)
%t A212680 LinearRecurrence[{2, 1, -4, 1, 2, -1 }, {0, 0, 4, 18, 56, 120 }, 40]
%Y A212680 Cf. A211795.
%K A212680 nonn,easy
%O A212680 0,3
%A A212680 _Clark Kimberling_, May 24 2012