A212257 Number of (v,w,x,y,z) with all terms in {0,1,...,n} and v=average(w,x,y,z).
1, 2, 21, 64, 157, 322, 601, 1024, 1641, 2498, 3661, 5184, 7141, 9602, 12657, 16384, 20881, 26242, 32581, 40000, 48621, 58562, 69961, 82944, 97657, 114242, 132861, 153664, 176821, 202498, 230881, 262144, 296481, 334082, 375157
Offset: 0
Keywords
Links
- Index entries for linear recurrences with constant coefficients, signature (4,-6,4,0,-4,6,-4,1)
Crossrefs
Cf. A211795.
Programs
-
Mathematica
t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[4 v == w + x + y + z, s = s + 1], {v, 0, #}, {w, 0, #}, {x, 0, #}, {y, 0, #}, {z, 0, #}] &[n]; s)]]; Map[t[#] &, Range[0, 40]] (* A212257 *) (* Peter J. C. Moses, Apr 13 2012 *) 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 *)
Formula
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).
From Benedict W. J. Irwin, Sep 05 2016: (Start)
a(n) = (1+7*(-1)^n)/8+n+3*n^2/2+n^3+n^4/4-sin(n*Pi/2).
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).
(End)
Comments