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.

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

This page as a plain text file.
%I A212576 #9 Aug 01 2015 10:21:24
%S A212576 0,1,2,7,16,33,52,87,126,181,246,331,422,545,674,831,1006,1213,1428,
%T A212576 1691,1964,2277,2614,2995,3388,3845,4314,4835,5388,5997,6620,7323,
%U A212576 8042,8825,9646,10535,11442,12445,13466,14563,15706,16929,18172
%N A212576 Number of (w,x,y,z) with all terms in {1,...,n} and  |w-x|=2|x-y|+2|y-z|.
%C A212576 For a guide to related sequences, see A211795.
%H A212576 <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0, 1, 2, 1, -2, -2, -2, 1, 2, 1, 0, -1).
%F A212576 a(n) = a(n-2)+2*a(n-3)+a(n-4)-2*a(n-5)-2*a(n-6)-2*a(n-7)+a(n-8)+2*a(n-9)+a(n-10)-a(n-12).
%F A212576 G.f.: (x + 2*x^2 + 6*x^3 + 12*x^4 + 21*x^5 + 22*x^6 + 21*x^7 + 12*x^8 + 6*x^9 + 2*x^10 + x^11)/(1 - x^2 - 2*x^3 - x^4 + 2*x^5 + 2*x^6 + 2*x^7 - x^8 - 2*x^9 - x^10 + x^12).
%t A212576 t = Compile[{{n, _Integer}}, Module[{s = 0},
%t A212576 (Do[If[Abs[w - x] == 2 Abs[x - y] + 2 Abs[y - z],
%t A212576 s = s + 1],
%t A212576 {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
%t A212576 Map[t[#] &, Range[0, 40]]   (* A212576 *)
%t A212576 LinearRecurrence[{0, 1, 2, 1, -2, -2, -2, 1, 2, 1, 0, -1}, {0, 1, 2, 7, 16, 33, 52, 87, 126, 181, 246, 331}, 50]
%Y A212576 Cf. A211795.
%K A212576 nonn,easy
%O A212576 0,3
%A A212576 _Clark Kimberling_, May 22 2012