login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of (v,w,x,y,z) with all terms in {0,1,...,n} and v=average(w,x,y,z).
2

%I #11 Sep 10 2016 12:28:16

%S 1,2,21,64,157,322,601,1024,1641,2498,3661,5184,7141,9602,12657,16384,

%T 20881,26242,32581,40000,48621,58562,69961,82944,97657,114242,132861,

%U 153664,176821,202498,230881,262144,296481,334082,375157

%N Number of (v,w,x,y,z) with all terms in {0,1,...,n} and v=average(w,x,y,z).

%C For a guide to related sequences, see A211795.

%H <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 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 From _Benedict W. J. Irwin_, Sep 05 2016: (Start)

%F a(n) = (1+7*(-1)^n)/8+n+3*n^2/2+n^3+n^4/4-sin(n*Pi/2).

%F 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 (End)

%t t = Compile[{{n, _Integer}}, Module[{s = 0},

%t (Do[If[4 v == w + x + y + z, s = s + 1], {v, 0, #},

%t {w, 0, #}, {x, 0, #}, {y, 0, #}, {z, 0, #}] &[n]; s)]];

%t Map[t[#] &, Range[0, 40]] (* A212257 *)

%t (* _Peter J. C. Moses_, Apr 13 2012 *)

%t 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 Cf. A211795.

%K nonn

%O 0,2

%A _Clark Kimberling_, May 15 2012