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.
%I A212257 #11 Sep 10 2016 12:28:16 %S A212257 1,2,21,64,157,322,601,1024,1641,2498,3661,5184,7141,9602,12657,16384, %T A212257 20881,26242,32581,40000,48621,58562,69961,82944,97657,114242,132861, %U A212257 153664,176821,202498,230881,262144,296481,334082,375157 %N A212257 Number of (v,w,x,y,z) with all terms in {0,1,...,n} and v=average(w,x,y,z). %C A212257 For a guide to related sequences, see A211795. %H A212257 <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,0,-4,6,-4,1) %F A212257 a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-4*a(n-5)+6*a(n-6)-4*a(n-7)+a(n-8). %F A212257 From _Benedict W. J. Irwin_, Sep 05 2016: (Start) %F A212257 a(n) = (1+7*(-1)^n)/8+n+3*n^2/2+n^3+n^4/4-sin(n*Pi/2). %F A212257 G.f.: 7/(8*(1+x))-x/(1+x^2)+(-1-26*x-16*x^2-6*x^3+x^4)/(8*(x-1)^5). %F A212257 (End) %t A212257 t = Compile[{{n, _Integer}}, Module[{s = 0}, %t A212257 (Do[If[4 v == w + x + y + z, s = s + 1], {v, 0, #}, %t A212257 {w, 0, #}, {x, 0, #}, {y, 0, #}, {z, 0, #}] &[n]; s)]]; %t A212257 Map[t[#] &, Range[0, 40]] (* A212257 *) %t A212257 (* _Peter J. C. Moses_, Apr 13 2012 *) %t A212257 Table[(1+7(-1)^n)/8+n+3n^2/2+n^3+n^4/4-Sin[n Pi/2], {n, 0, 30}] (* _Benedict W. J. Irwin_, Sep 05 2016 *) %Y A212257 Cf. A211795. %K A212257 nonn %O A212257 0,2 %A A212257 _Clark Kimberling_, May 15 2012