A212683 Number of (w,x,y,z) with all terms in {1,...,n} and |x-y| = w + |y-z|.
0, 0, 2, 8, 22, 46, 84, 138, 212, 308, 430, 580, 762, 978, 1232, 1526, 1864, 2248, 2682, 3168, 3710, 4310, 4972, 5698, 6492, 7356, 8294, 9308, 10402, 11578, 12840, 14190, 15632, 17168, 18802, 20536, 22374, 24318, 26372, 28538, 30820
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1).
Programs
Formula
a(n) = 2*A019298(n-1) for n>=1.
a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5).
G.f.: (2*x^2 + 2*x^3 + 2*x^4)/(1 - 3*x + 2*x^2 + 2*x^3 - 3*x^4 + x^5).
a(n) = (2*n^3 - 3*n^2 + 2*n - (n mod 2))/4. - Ayoub Saber Rguez, Sep 02 2021
Comments